Changeset 270 in main for trunk


Ignore:
Timestamp:
09/16/10 14:46:26 (10 years ago)
Author:
pjoulaud
Message:

Possibility to drag the graph in navigate function

Location:
trunk/openPLM
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/openPLM/media/js/navigate.js

    r246 r270  
    4343      }, "fast"); 
    4444    }); 
     45 
     46  $(".img_nav").draggable({ 
     47      cursor: 'move' 
     48      }); 
     49 
    4550  }); 
    46  
  • trunk/openPLM/plmapp/forms.py

    r261 r270  
    107107    LISTE = m.get_all_users_and_plmobjects_with_level() 
    108108    type = forms.TypedChoiceField(choices=LISTE) 
     109 
     110class type_form_without_user(forms.Form): 
     111    LISTE_WO_USER = m.get_all_plmobjects_with_level() 
     112    type = forms.TypedChoiceField(choices=LISTE_WO_USER) 
    109113 
    110114class TypeSearchForm(type_form): 
  • trunk/openPLM/plmapp/models.py

    r261 r270  
    917917@memoize_noarg 
    918918def get_all_users_and_plmobjects_with_level(): 
    919     list_of_choices = get_all_plmobjects_with_level() 
     919    list_of_choices = list(get_all_plmobjects_with_level()) 
    920920    level=">" 
    921921    _get_all_subclasses_with_level(User, list_of_choices, level) 
  • trunk/openPLM/plmapp/views.py

    r261 r270  
    221221    if request_dict.GET and "type" in request_dict.GET: 
    222222        type_form_instance = type_form(request_dict.GET) 
     223        type_form_instance4creation = type_form_without_user(request_dict.GET) 
    223224        if type_form_instance.is_valid(): 
    224225            cls = models.get_all_users_and_plmobjects()[type_form_instance.cleaned_data["type"]] 
     
    228229    elif request_dict.session and "type" in request_dict.session: 
    229230        type_form_instance = type_form(request_dict.session) 
     231        type_form_instance4creation = type_form_without_user(request_dict.session) 
    230232        cls = models.get_all_users_and_plmobjects()[request_dict.session["type"]] 
    231233        attributes_form_instance = get_search_form(cls, request_dict.session) 
    232234    else: 
    233235        type_form_instance = type_form() 
     236        type_form_instance4creation = type_form_without_user() 
    234237        request_dict.session['type'] = 'Part' 
    235238        attributes_form_instance = get_search_form(models.Part) 
     
    248251        qset = request_dict.session.get("results", []) 
    249252    context_dict.update({'results' : qset, 'type_form' : type_form_instance, 
     253                         'type_form4creation' : type_form_instance4creation, 
    250254                         'attributes_form' : attributes_form_instance, 
    251255                         'class4search_div' : 'DisplayHomePage.htm', 
  • trunk/openPLM/templates/DisplayHomePage.htm

    r253 r270  
    103103                <table class="Content"> 
    104104                        <tr> 
    105                                 {% for attribute in type_form %} 
     105                                {% for attribute in type_form4creation %} 
    106106                                        <th>{{attribute.label_tag}}</th> 
    107107                                        <td>{{attribute}}</td> 
  • trunk/openPLM/templates/Navigate.htm

    r228 r270  
    1111    </form> 
    1212    <br /> 
    13     <div id="Navigate"> 
     13    <div id="Navigate" > 
    1414         
    15         <img class="img_nav" style="left:{{x_img_position}}px; top:{{y_img_position}}px;" 
     15        <img class="img_nav" style="left:{{x_img_position}}px; top:{{y_img_position}}px " 
    1616                 src="{{picture_path}}" usemap="#_anonymous_0" title="Navigate" alt="Navigate" /> 
    1717        {{map_areas|safe}} 
Note: See TracChangeset for help on using the changeset viewer.