Changeset 290 in main


Ignore:
Timestamp:
09/15/11 09:40:08 (8 years ago)
Author:
pcosquer
Message:

fix find and create buttons

File:
1 edited

Legend:

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

    r289 r290  
    1212    $("#CreationBox").show(); 
    1313    show_left_panel(); 
    14     $.cookie("create_box", true); 
     14    $.cookie("create_box", "true", { path: '/' }); 
    1515} 
    1616 
     
    1818    $("#SearchBox").show(); 
    1919    show_left_panel(); 
    20     $.cookie("search_box", true); 
     20    $.cookie("search_box", "true", { path: '/' }); 
    2121} 
    2222 
     
    2626        hide_left_panel(); 
    2727    } 
    28     $.cookie("create_box", false); 
     28    $.cookie("create_box", "false", { path: '/' }); 
    2929} 
    3030 
     
    3434        hide_left_panel(); 
    3535    } 
    36     $.cookie("search_box", false); 
     36    $.cookie("search_box", "false", { path: '/' }); 
    3737} 
    3838 
     
    6161$(function (){ 
    6262 
    63     var search = $.cookie("search_box"); 
    64     var create = $.cookie("create_box"); 
    65     $("#FindButton").button({disable: !search}).click(toggle_search_box); 
    66     $("#CreationButton").button({disable: !create}).click(toggle_create_box); 
     63    var search = $.cookie("search_box") === "true"; 
     64    var create = $.cookie("create_box") === "true"; 
     65 
     66    $("#FindButton").attr("checked", search); 
     67    $("#CreationButton").attr("checked", create); 
     68    $("#FindButton").button().click(toggle_search_box); 
     69    $("#CreationButton").button().click(toggle_create_box); 
    6770 
    6871    if (search){ 
     
    7982    } 
    8083 
    81  
    8284}); 
Note: See TracChangeset for help on using the changeset viewer.