Changeset 8961 for extensions/GrumPluginClasses/js/ui.categorySelector.js
- Timestamp:
- Jan 28, 2011, 4:54:02 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GrumPluginClasses/js/ui.categorySelector.js
r7181 r8961 2 2 * ----------------------------------------------------------------------------- 3 3 * file: ui.categorySelector.js 4 * file version: 1. 0.15 * date: 201 0-10-104 * file version: 1.1.0 5 * date: 2011-01-12 6 6 * 7 7 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses" … … 28 28 * | | | * add 'name' property 29 29 * | | | 30 * | 1.1.0 | 2011/01/12 | * checkbox moved between +/- button and text 31 * | | | 32 * | | | * dropdown list is managed like dropdown list on 33 * | | | <select> object (hidden only when object loose 34 * | | | focus ) 35 * | | | 36 * | | | * selected values are dislayed like tags 37 * | | | 38 * | | | * add 'isValid' method 39 * | | | 40 * | | | * add 'displayPath' property 41 * | | | 30 42 * | | | 31 43 * … … 61 73 levelIndent:16, 62 74 iconWidthEC:15, 63 iconWidthCheck:18,64 75 serverUrl:'plugins/GrumPluginClasses/gpc_ajax.php', 65 76 filter:'accessible', … … 68 79 load:null, 69 80 multiple:false, 70 userMode:'public' 81 userMode:'public', 82 popupMode:'click', 83 displayPath:false, 84 downArrow:'⇓' 71 85 }; 72 86 … … 86 100 categories:[], 87 101 labelStatus:['', ''], 102 mouseOver:false, 103 isValid:true 88 104 } 89 105 ); … … 98 114 { 99 115 'class':'ui-category-selector', 116 tabindex:0, 100 117 css:{ 101 118 width:'100%' … … 106 123 { 107 124 privateMethods.displaySelector($this, !$this.data('properties').selectorVisible); 125 $(this).focus(); 108 126 } 109 127 ), … … 111 129 { 112 130 html: ' ', 113 'class':'ui-category-selector-name' ,131 'class':'ui-category-selector-name' 114 132 } 115 133 ), 134 containerList:null, 116 135 containerStatus:$('<div/>', 117 136 { … … 132 151 } 133 152 } 153 ).bind('mousedown', 154 function () 155 { 156 $(this).addClass('ui-category-selector-arrow-active'); 157 } 158 ).bind('mouseup', 159 function () 160 { 161 $(this).removeClass('ui-category-selector-arrow-active'); 162 } 134 163 ), 135 136 164 listContainer:$('<div/>', 137 165 { … … 144 172 } 145 173 } 146 ).bind('mouseleave.categorySelector', 147 function () 148 { 149 privateMethods.displaySelector($this, false); 150 } 151 ), 174 ), 152 175 list:$('<ul/>', 153 176 { … … 160 183 ) 161 184 }; 162 163 $this 164 .html('') 165 .append(objects.container.append(objects.containerArrow).append(objects.containerStatus).append(objects.containerName)) 166 .append(objects.listContainer.append(objects.list)); 167 168 $this.data('objects', objects); 169 } 185 } 186 187 $this.data('objects', objects); 170 188 171 189 privateMethods.setOptions($this, opt); 190 191 192 if($this.html()!='') privateMethods.setItems($this, $this.html()); 193 194 $this 195 .html('') 196 .append(objects.container.append(objects.containerArrow).append(objects.containerStatus).append(objects.containerName)) 197 .append(objects.listContainer.append(objects.list)); 198 172 199 } 173 200 ); … … 258 285 listMaxWidth: function (value) 259 286 { 260 if(value )287 if(value!=null) 261 288 { 262 289 return this.each(function() … … 283 310 listMaxHeight: function (value) 284 311 { 285 if(value )312 if(value!=null) 286 313 { 287 314 return this.each(function() … … 333 360 levelIndent: function (value) 334 361 { 335 if(value )362 if(value!=null) 336 363 { 337 364 return this.each(function() … … 358 385 serverUrl: function (value) 359 386 { 360 if(value )387 if(value!=null) 361 388 { 362 389 return this.each(function() … … 383 410 filter: function (value) 384 411 { 385 if(value )412 if(value!=null) 386 413 { 387 414 return this.each(function() … … 428 455 iconWidthEC: function (value) 429 456 { 430 if(value )457 if(value!=null) 431 458 { 432 459 return this.each(function() … … 451 478 }, // iconWidthEC 452 479 453 iconWidthCheck: function (value)454 { 455 if(value )480 userMode: function (value) 481 { 482 if(value!=null) 456 483 { 457 484 return this.each(function() 458 485 { 459 privateMethods.set IconWidthCheck($(this), value);486 privateMethods.setUserMode($(this), value); 460 487 } 461 488 ); … … 467 494 if(options) 468 495 { 469 return(options. iconWidthCheck);496 return(options.userMode); 470 497 } 471 498 else … … 474 501 } 475 502 } 476 }, // iconWidthCheck477 478 userMode: function (value)479 {480 if(value)481 {482 return this.each(function()483 {484 privateMethods.setUserMode($(this), value);485 }486 );487 }488 else489 {490 var options = this.data('options');491 492 if(options)493 {494 return(options.userMode);495 }496 else497 {498 return(0);499 }500 }501 503 }, // userMode 502 504 … … 504 506 { 505 507 var options=this.data('options'), 506 properties=this.data('properties'), 507 objects=this.data('objects'); 508 properties=this.data('properties'); 508 509 509 510 if(!options.multiple) … … 522 523 }, // userMode 523 524 525 popupMode: function (value) 526 { 527 if(value!=null) 528 { 529 return this.each(function() 530 { 531 privateMethods.setPopupMode($(this), value); 532 } 533 ); 534 } 535 else 536 { 537 var options = this.data('options'); 538 539 if(options) 540 { 541 return(options.popupMode); 542 } 543 else 544 { 545 return(0); 546 } 547 } 548 }, // popupMode 549 550 displayPath: function (value) 551 { 552 if(value!=null) 553 { 554 return this.each(function() 555 { 556 privateMethods.setDisplayPath($(this), value); 557 } 558 ); 559 } 560 else 561 { 562 var options = this.data('options'); 563 564 if(options) 565 { 566 return(options.displayPath); 567 } 568 else 569 { 570 return(0); 571 } 572 } 573 }, // displayPath 574 575 downArrow: function (value) 576 { 577 if(value!=null) 578 { 579 return this.each(function() 580 { 581 privateMethods.setDownArrow($(this), value); 582 } 583 ); 584 } 585 else 586 { 587 var options = this.data('options'); 588 589 if(options) 590 { 591 return(options.downArrow); 592 } 593 else 594 { 595 return(''); 596 } 597 } 598 }, // downArrow 599 524 600 value: function (value) 525 601 { 526 if(value )602 if(value!=null) 527 603 { 528 604 // set selected value … … 559 635 } 560 636 }, // value 637 638 isValid: function (value) 639 { 640 if(value!=null) 641 { 642 return this.each(function() 643 { 644 privateMethods.setIsValid($(this), value); 645 } 646 ); 647 } 648 else 649 { 650 var properties=this.data('properties'); 651 return(properties.isValid); 652 } 653 }, // isValid 654 561 655 load: function (value) 562 656 { … … 634 728 } 635 729 }, // popup 730 636 731 numberOfCategories: function () 637 732 { … … 647 742 } 648 743 }, // numberOfCategories 744 649 745 properties: function (value) 650 746 { 651 var properties=this.data('properties'); 747 var properties=this.data('properties'), 748 options=this.data('options'); 652 749 653 750 if(properties && value==':first' && properties.categories.length>0) … … 657 754 else if(properties && properties.index!=null && (value==':selected' || value==null) && properties.categories.length>0) 658 755 { 659 if(!option .multiple && properties.index>-1 && properties.index<properties.categories.length)756 if(!options.multiple && properties.index>-1 && properties.index<properties.categories.length) 660 757 { 661 758 return(properties.categories[properties.index]); 662 759 } 663 else if(option .multiple)760 else if(options.multiple) 664 761 { 665 762 var returned=[]; … … 686 783 return(null); 687 784 } 688 } ,// numberOfCategories785 } // numberOfCategories 689 786 }; // methods 690 787 … … 711 808 privateMethods.setLevelIndent(object, (value.levelIndent!=null)?value.levelIndent:options.levelIndent); 712 809 privateMethods.setIconWidthEC(object, (value.iconWidthEC!=null)?value.iconWidthEC:options.iconWidthEC); 713 privateMethods.setIconWidthCheck(object, (value.iconWidthCheck!=null)?value.iconWidthCheck:options.iconWidthCheck);714 810 privateMethods.setServerUrl(object, (value.serverUrl!=null)?value.serverUrl:options.serverUrl); 715 811 privateMethods.setFilter(object, (value.filter!=null)?value.filter:options.filter); 716 812 privateMethods.setUserMode(object, (value.userMode!=null)?value.userMode:options.userMode); 813 privateMethods.setPopupMode(object, (value.popupMode!=null)?value.popupMode:options.popupMode); 814 privateMethods.setDisplayPath(object, (value.displayPath!=null)?value.displayPath:options.displayPath); 815 privateMethods.setDownArrow(object, (value.downArrow!=null)?value.downArrow:options.downArrow); 717 816 privateMethods.setEventPopup(object, (value.popup!=null)?value.popup:options.popup); 718 817 privateMethods.setEventChange(object, (value.change!=null)?value.change:options.change); … … 725 824 }, 726 825 826 setIsValid : function (object, value) 827 { 828 var objects=object.data('objects'), 829 properties=object.data('properties'); 830 831 if(properties.isValid!=value) 832 { 833 properties.isValid=value; 834 if(properties.isValid) 835 { 836 objects.container.removeClass('ui-error'); 837 } 838 else 839 { 840 objects.container.addClass('ui-error'); 841 } 842 } 843 return(properties.isValid); 844 }, 845 727 846 setAutoLoad : function (object, value) 728 847 { 729 848 var options=object.data('options'), 730 849 properties=object.data('properties'); 850 731 851 if((!properties.initialized || options.autoLoad!=value) && (value==true || value==false)) 732 852 { … … 740 860 var options=object.data('options'), 741 861 properties=object.data('properties'); 862 742 863 if((!properties.initialized || options.galleryRoot!=value) && (value==true || value==false)) 743 864 { … … 753 874 properties=object.data('properties'), 754 875 objects=object.data('objects'); 876 755 877 if((!properties.initialized || options.listMaxWidth!=value) && value>=0) 756 878 { … … 773 895 properties=object.data('properties'), 774 896 objects=object.data('objects'); 897 775 898 if((!properties.initialized || options.listMaxHeight!=value) && value>=0) 776 899 { … … 793 916 properties=object.data('properties'), 794 917 objects=object.data('objects'); 918 795 919 if((!properties.initialized || options.displayStatus!=value) && (value==true || value==false)) 796 920 { … … 813 937 properties=object.data('properties'), 814 938 objects=object.data('objects'); 939 815 940 if((!properties.initialized || options.levelIndent!=value) && value>=0) 816 941 { … … 819 944 function () 820 945 { 821 $(this).css('padding-left', (options.iconWidthEC+ options.iconWidthCheck+$(this).attr('level')*options.levelIndent)+'px');946 $(this).css('padding-left', (options.iconWidthEC+$(this).attr('level')*options.levelIndent)+'px'); 822 947 } 823 948 ); … … 830 955 var options=object.data('options'), 831 956 properties=object.data('properties'); 957 832 958 if(!properties.initialized || options.serverUrl!=value) 833 959 { … … 838 964 }, 839 965 840 841 966 setFilter : function (object, value) 842 967 { 843 968 var options=object.data('options'), 844 969 properties=object.data('properties'); 970 845 971 if((!properties.initialized || options.filter!=value) && (value=='none' || value=='accessible' || value=='public')) 846 972 { … … 856 982 properties=object.data('properties'), 857 983 objects=object.data('objects'); 984 858 985 if((!properties.initialized || options.iconWidthEC!=value) && value>=0) 859 986 { … … 862 989 function () 863 990 { 864 $(this).css('padding-left', (options.iconWidthEC+ options.iconWidthCheck+$(this).attr('level')*options.levelIndent)+'px');865 } 866 ); 867 } 868 return(options. filter);869 }, 870 871 set IconWidthCheck: function (object, value)991 $(this).css('padding-left', (options.iconWidthEC+$(this).attr('level')*options.levelIndent)+'px'); 992 } 993 ); 994 } 995 return(options.iconWidthEC); 996 }, 997 998 setMultiple : function (object, value) 872 999 { 873 1000 var options=object.data('options'), 874 1001 properties=object.data('properties'), 875 1002 objects=object.data('objects'); 876 if((!properties.initialized || options.iconWidthCheck!=value) && (value>=0 && options.multiple || !options.multiple && value==0)) 877 { 878 options.iconWidthCheck=value; 879 objects.list.find('.ui-category-selector-item').each( 880 function () 881 { 882 $(this).css('padding-left', (options.iconWidthEC+options.iconWidthCheck+$(this).attr('level')*options.levelIndent)+'px'); 883 } 884 ); 885 } 886 return(options.filter); 887 }, 888 889 setMultiple : function (object, value) 1003 1004 if((!properties.initialized || options.multiple!=value) && (value==true || value==false)) 1005 { 1006 if(!value) 1007 { 1008 properties.index=-1; 1009 if(objects.containerList!=null) 1010 { 1011 objects.containerList.remove(); 1012 objects.containerList=null; 1013 } 1014 } 1015 else 1016 { 1017 properties.index=[]; 1018 objects.listContainer.addClass('ui-category-selector-multiple'); 1019 if(objects.containerList==null) 1020 { 1021 objects.containerList=$('<ul/>', 1022 { 1023 css: { 1024 listStyle:'none', 1025 padding:'0px', 1026 margin:'0px', 1027 overflow:"auto" 1028 }, 1029 html:'<li> </li>' 1030 } 1031 ); 1032 objects.containerName.html('').append(objects.containerList); 1033 } 1034 } 1035 options.multiple=value; 1036 } 1037 return(options.multiple); 1038 }, //setMultiple 1039 1040 setUserMode : function (object, value) 1041 { 1042 var options=object.data('options'), 1043 properties=object.data('properties'); 1044 1045 if((!properties.initialized || options.userMode!=value) && (value=='admin' || value=='public')) 1046 { 1047 options.userMode=value; 1048 if(options.autoLoad && properties.initialized) privateMethods.load(object); 1049 } 1050 return(options.userMode); 1051 }, //setUserMode 1052 1053 setPopupMode : function (object, value) 890 1054 { 891 1055 var options=object.data('options'), 892 1056 properties=object.data('properties'), 893 1057 objects=object.data('objects'); 894 if((!properties.initialized || options.multiple!=value) && (value==true || value==false)) 895 { 896 if(!value) 897 { 898 privateMethods.setIconWidthCheck(object, 0); 899 properties.index=-1; 900 } 901 else 902 { 903 properties.index=[]; 904 objects.listContainer.addClass('ui-category-selector-multiple'); 905 } 906 options.multiple=value; 907 } 908 return(options.filter); 909 }, //setMultiple 910 911 setUserMode : function (object, value) 1058 1059 if((!properties.initialized || options.popupMode!=value) && (value=='click' || value=='mouseout')) 1060 { 1061 options.popupMode=value; 1062 1063 if(value=='mouseout') 1064 { 1065 objects.listContainer 1066 .unbind('mouseleave.categorySelector') 1067 .unbind('mouseenter.categorySelector') 1068 .bind('mouseleave.categorySelector', 1069 function () 1070 { 1071 privateMethods.displaySelector(object, false); 1072 } 1073 ); 1074 } 1075 else 1076 { 1077 objects.listContainer 1078 .unbind('mouseleave.categorySelector') 1079 .bind('mouseleave.categorySelector', 1080 function () 1081 { 1082 properties.mouseOver=false; 1083 } 1084 ) 1085 .bind('mouseenter.categorySelector', 1086 function () 1087 { 1088 properties.mouseOver=true; 1089 } 1090 ); 1091 $(document).bind('focusout focusin', 1092 function (event) 1093 { 1094 if(!properties.mouseOver) privateMethods.displaySelector(object, false); 1095 } 1096 ); 1097 } 1098 } 1099 return(options.popupMode); 1100 }, //setUserMode 1101 1102 1103 setDisplayPath : function (object, value) 912 1104 { 913 1105 var options=object.data('options'), 914 1106 properties=object.data('properties'), 915 1107 objects=object.data('objects'); 916 if((!properties.initialized || options.userMode!=value) && (value=='admin' || value=='public')) 917 { 918 options.userMode=value; 919 if(options.autoLoad && properties.initialized) privateMethods.load(object); 920 } 921 return(options.filter); 922 }, //setUserMode 1108 1109 if((!properties.initialized || options.displayPath!=value) && (value==true || value==false)) 1110 { 1111 options.displayPath=value; 1112 1113 } 1114 return(options.userMode); 1115 }, //setDisplayPath 1116 1117 setDownArrow : function (object, value) 1118 { 1119 var options=object.data('options'), 1120 properties=object.data('properties'), 1121 objects=object.data('objects'); 1122 1123 if(!properties.initialized || options.downArrow!=value) 1124 { 1125 options.downArrow=value; 1126 objects.containerArrow.html(options.downArrow); 1127 } 1128 return(options.downArrow); 1129 }, //setDownArrow 1130 1131 1132 setItems : function (object, value) 1133 { 1134 var properties=object.data('properties'), 1135 options=object.data('options'), 1136 objects=object.data('objects'); 1137 1138 if(value=='' || value==null) 1139 { 1140 value={ 1141 status:['',''], 1142 categories:[] 1143 } 1144 } 1145 else if($.isArray(value)) 1146 { 1147 value={ 1148 status:'public', 1149 categories:value 1150 } 1151 } 1152 else 1153 { 1154 try 1155 { 1156 value=$.parseJSON($.trim(value)); 1157 } 1158 catch (e) 1159 { 1160 return(false); 1161 } 1162 } 1163 1164 properties.labelStatus=value.status; 1165 privateMethods.listClear(object); 1166 if(value.categories.length>0) privateMethods.listAddItems(object, value.categories, objects.list); 1167 1168 properties.initialized=false; 1169 if(options.multiple) 1170 { 1171 privateMethods.setValue(object, ':none'); 1172 } 1173 else 1174 { 1175 privateMethods.setValue(object, ':first'); 1176 } 1177 properties.initialized=true; 1178 1179 if(options.load) object.trigger('categorySelectorLoad'); 1180 }, 923 1181 924 1182 /** … … 1198 1456 if(!options.multiple && (!properties.initialized || properties.index!=index) && index>-1) 1199 1457 { 1458 1200 1459 objects.list.find('.ui-category-selector-selected-item').removeClass('ui-category-selector-selected-item'); 1201 1460 objects.list.find('[catId="'+value+'"]').addClass('ui-category-selector-selected-item'); 1461 title=privateMethods.getParentName(object, objects.list.find('[catId="'+value+'"] div.ui-category-selector-name')).replace('&', '&').replace('>', '>').replace('<', '<'); 1202 1462 properties.index=index; 1203 objects.containerName.html(properties.categories[properties.index].name) ;1463 objects.containerName.html(properties.categories[properties.index].name).attr('title', title); 1204 1464 objects.containerStatus.html(properties.labelStatus[properties.categories[properties.index].status]); 1205 1465 if(trigger && options.change) object.trigger('categorySelectorChange', [properties.categories[properties.index].id]); … … 1232 1492 tmp.push(properties.categories[index[i]].id); 1233 1493 } 1234 containerHtml='';1494 objects.containerList.html(''); 1235 1495 objects.list.find('.ui-category-selector-selected-item div.ui-category-selector-name').each( 1236 1496 function () 1237 1497 { 1238 containerHtml+=((containerHtml=='')?'':' ; ')+$(this).html(); 1239 } 1240 ); 1241 if(containerHtml=='') containerHtml=" "; 1242 objects.containerName.html(containerHtml); 1498 var path=''; 1499 1500 title=privateMethods.getParentName(object, $(this)).replace('&', '&').replace('>', '>').replace('<', '<'); 1501 if(!options.displayPath) 1502 { 1503 path=$(this).html(); 1504 } 1505 else 1506 { 1507 path=title; 1508 } 1509 1510 objects.containerList.append( 1511 $('<li/>', 1512 { 1513 html:path, 1514 title:title, 1515 'class':'ui-category-selector-selected-cat' 1516 } 1517 ).prepend( 1518 $('<span/>', 1519 { 1520 html:'x' 1521 } 1522 ).bind('click.categorySelector', 1523 {object:object, value:$(this).parent().parent().attr('catid')}, 1524 function (event) 1525 { 1526 event.stopPropagation(); 1527 privateMethods.setValue(event.data.object, event.data.value); 1528 } 1529 ) 1530 ) 1531 ) 1532 } 1533 ); 1534 1535 if(objects.containerList.children().length==0) objects.containerList.append('<li> </li>'); 1536 1243 1537 if(trigger && options.change) object.trigger('categorySelectorChange', [tmp]); 1244 1538 return(tmp); … … 1246 1540 return(null); 1247 1541 }, 1542 1543 getParentName : function (object, item) 1544 { 1545 if(item==null || item.length==0) return(''); 1546 foundItem=item.parent().parent().parent().prev().find('div.ui-category-selector-name'); 1547 1548 if(foundItem.length==0) return(item.html()); 1549 1550 return(privateMethods.getParentName(object, foundItem)+' / '+item.html()); 1551 }, 1248 1552 1249 1553 displaySelector : function (object, value) … … 1252 1556 properties=object.data('properties'), 1253 1557 objects=object.data('objects'); 1558 1254 1559 if(properties.selectorVisible!=value) 1255 1560 { … … 1266 1571 } 1267 1572 ); 1573 1268 1574 if($.isArray(properties.index)) 1269 1575 { … … 1289 1595 // load datas from server through an asynchronous ajax call 1290 1596 var options=object.data('options'), 1291 properties=object.data('properties'),1292 1597 objects=object.data('objects'); 1598 1599 if(options.serverUrl=='') return(false); 1293 1600 1294 1601 $.ajax( … … 1306 1613 success: function(msg) 1307 1614 { 1308 list=$.parseJSON(msg); 1309 1310 properties.labelStatus=list.status; 1311 privateMethods.listClear(object); 1312 privateMethods.listAddItems(object, list.categories, objects.list); 1313 1314 properties.initialized=false; 1315 privateMethods.setValue(object, ':first'); 1316 properties.initialized=true; 1317 1318 if(options.load) object.trigger('categorySelectorLoad'); 1615 privateMethods.setItems(object, msg); 1319 1616 }, 1320 1617 error: function(msg) 1321 1618 { 1322 1619 objects.listContainer.html('Error ! '+msg); 1323 } ,1620 } 1324 1621 } 1325 1622 ); … … 1345 1642 properties.categories=[]; 1346 1643 }, 1644 1347 1645 listAddItems : function (object, listItems, parent) 1348 1646 { … … 1374 1672 } 1375 1673 1376 var spaceWidth = (options.iconWidthEC+ options.iconWidthCheck+listItems[i].level*options.levelIndent),1674 var spaceWidth = (options.iconWidthEC+listItems[i].level*options.levelIndent), 1377 1675 li=$('<li/>', 1378 1676 { … … 1389 1687 function (event) 1390 1688 { 1391 if(!event.layerX && event.offsetX) 1392 { 1393 // trick for IE.. 1394 event.layerX=event.offsetX; 1395 event.layerY=event.offsetY; 1396 } 1689 event.layerX=event.pageX-$(event.currentTarget).offset().left; 1690 event.layerY=event.pageY-$(event.currentTarget).offset().top; 1397 1691 1398 1692 if(event.layerX<event.data.expandArea && event.data.nbchilds>0 ) … … 1424 1718 } 1425 1719 } 1720 1721 if(options.multiple) objects.container.focus(); 1426 1722 } 1427 1723 ); 1428 1724 if(listItems[i].childs.length>0) 1429 1725 { 1430 li.addClass('ui-category-selector-collapsable-item').css('background-position', (options. iconWidthCheck+options.levelIndent*listItems[i].level)+'px 0px');1726 li.addClass('ui-category-selector-collapsable-item').css('background-position', (options.levelIndent*listItems[i].level)+'px 0px'); 1431 1727 } 1432 1728 1433 1729 if(options.multiple) 1434 1730 { 1435 li. prepend('<div class="ui-category-selector-check"></div>');1731 li.children().prepend('<div class="ui-category-selector-check"></div>'); 1436 1732 } 1437 1733 … … 1465 1761 */ 1466 1762 var properties=object.data('properties'); 1763 1467 1764 for(var i=0;i<properties.categories.length;i++) 1468 1765 { … … 1471 1768 return(-1); 1472 1769 }, 1770 1473 1771 setEventPopup : function (object, value) 1474 1772 { 1475 1773 var options=object.data('options'); 1774 1476 1775 options.popup=value; 1477 1776 object.unbind('categorySelectorPopup'); … … 1479 1778 return(options.popup); 1480 1779 }, 1780 1481 1781 setEventChange : function (object, value) 1482 1782 { 1483 1783 var options=object.data('options'); 1784 1484 1785 options.change=value; 1485 1786 object.unbind('categorySelectorChange'); … … 1487 1788 return(options.change); 1488 1789 }, 1790 1489 1791 setEventLoad : function (object, value) 1490 1792 { 1491 1793 var options=object.data('options'); 1794 1492 1795 options.load=value; 1493 1796 object.unbind('categorySelectorLoad');
Note: See TracChangeset
for help on using the changeset viewer.