Ignore:
Timestamp:
Jun 24, 2012, 9:18:26 PM (12 years ago)
Author:
grum
Message:

feature:2634- compatibility with Piwigo 2.4
+add some objects on js framework

Location:
extensions/GrumPluginClasses/js
Files:
7 added
17 edited

Legend:

Unmodified
Added
Removed
  • extensions/GrumPluginClasses/js/rbCriteriaBuilder.js

    r10884 r16012  
    109109          helpMove:'',
    110110          helpSwitchCondition:'',
    111           ajaxUrl:''
     111          ajaxUrl:'',
     112          token:''
    112113        },
    113114      extraData = new Array();
     
    590591    }
    591592
    592     var datas=encodeURI('ajaxfct=public.rbuilder.searchExecute&requestName='+itemsId.container+'&'+getItems());
     593    var datas=encodeURI('ajaxfct=public.rbuilder.searchExecute&token='+options.token+'&requestName='+itemsId.container+'&'+getItems());
    593594    $.ajax(
    594595      {
     
    621622        url: options.ajaxUrl,
    622623        async: true,
    623         data: {ajaxfct:'public.rbuilder.searchGetPage', page:pageNumber, requestNumber:requestNumber, numPerPage:numberPerPage},
     624        data: {
     625            ajaxfct:'public.rbuilder.searchGetPage',
     626            page:pageNumber,
     627            requestNumber:requestNumber,
     628            numPerPage:numberPerPage,
     629            token:options.token
     630          },
    624631        success: function(msg)
    625632          {
  • extensions/GrumPluginClasses/js/rbSearch.js

    r10884 r16012  
    5252            requestResultRequestNumber:0,
    5353            onPageChange:null,
    54             numberPerPage:30
     54            numberPerPage:30,
     55            token:''
    5556          };
    5657
     
    245246          url: "plugins/GrumPluginClasses/gpc_ajax.php",
    246247          async: true,
    247           data: { ajaxfct:"admin.rbuilder.fillCaddie", fillMode:mode, requestNumber:requestNumber },
     248          data: {
     249              ajaxfct:"admin.rbuilder.fillCaddie",
     250              fillMode:mode,
     251              requestNumber:requestNumber,
     252              token:options.token
     253            },
    248254          success:
    249255            function(msg)
  • extensions/GrumPluginClasses/js/simpleTip.js

    r15340 r16012  
    391391      {
    392392        case 'Up':
    393           bgp='-'+items[itemIndex].options.arrowHeight+'px 0px';
     393          bgp='0px -'+items[itemIndex].options.arrowHeight+'px';
    394394          break;
    395395        case 'Left':
    396           bgp='0px -'+items[itemIndex].options.arrowWeight+'px';
     396          bgp='-'+items[itemIndex].options.arrowWidth+'px 0px';
    397397          break;
    398398        case 'Down':
     
    400400          break;
    401401        case 'Right':
    402           bgp='-'+items[itemIndex].options.arrowHeight+'px -'+items[itemIndex].options.arrowWeight+'px';
     402          bgp='-'+items[itemIndex].options.arrowHeight+'px -'+items[itemIndex].options.arrowWidth+'px';
    403403          break;
    404404      }
  • extensions/GrumPluginClasses/js/ui.categorySelector.js

    r15340 r16012  
    33 * file: ui.categorySelector.js
    44 * file version: 1.1.1
    5  * date: 2012-05-25
     5 * date: 2012-06-18
    66 *
    77 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses"
     
    1111 *   email    : grum@piwigo.com
    1212 *   website  : http://photos.grum.fr
    13  *   PWG user : http://forum.phpwebgallery.net/profile.php?id=3706
    1413 *
    1514 *   << May the Little SpaceFrog be with you ! >>
     
    4039 * |         |            | * add 'displayPath' property
    4140 * |         |            |
    42  * | 1.1.1   | 2012-05-25 | * fix bug with jquery 1.7.2
     41 * | 1.1.1   | 2012-06-18 | * fix bug with jquery 1.7.2
    4342 * |         |            |   . display list now works :)
    4443 * |         |            |
     44 * |         |            | * improve memory managment
    4545 * |         |            |
    4646 * |         |            |
     
    6565              // default values for the plugin
    6666              var $this=$(this),
     67                  timeStamp=new Date(),
    6768                  data = $this.data('options'),
    6869                  objects = $this.data('objects'),
     
    7980                      iconWidthEC:15,
    8081                      serverUrl:'plugins/GrumPluginClasses/gpc_ajax.php',
     82                      postData:{},
    8183                      filter:'accessible',
    8284                      popup:null,
     
    8789                      popupMode:'click',
    8890                      displayPath:false,
    89                       downArrow:'&dArr;'
     91                      downArrow:'' //'&dArr;'
    9092                    };
    9193
     
    100102                $this.data('properties',
    101103                  {
     104                    objectId:'cs'+Math.ceil(timeStamp.getTime()*Math.random()),
    102105                    index:-1,
    103106                    initialized:false,
     
    142145                        'class':'ui-category-selector-status',
    143146                        css: {
    144                           float:'right',
     147                          'float':'right',
    145148                          display:(options.displayStatus)?'block':'none'
    146149                        }
     
    213216              var $this=$(this),
    214217                  objects = $this.data('objects');
     218              objects.containerName.unbind().remove();
     219              objects.containerList.unbind().remove();
     220              objects.containerStatus.unbind().remove();
     221              objects.containerArrow.unbind().remove();
    215222              objects.container.unbind().remove();
    216223              objects.list.children().unbind();
    217224              objects.listContainer.remove();
     225              $(document).unbind('focusout.'+properties.objectId+' focusin.'+properties.objectId);
    218226              $this
     227                .removeData()
    219228                .unbind('.categorySelector')
    220229                .css(
     
    224233                  }
    225234                );
     235              delete $this;
    226236            }
    227237          );
     
    412422          }
    413423        }, // serverUrl
     424
     425      postData: function (value)
     426        {
     427          if(value!=null)
     428          {
     429            // set selected value
     430            return(
     431              this.each(
     432                function()
     433                {
     434                  privateMethods.setPostData($(this), value, true);
     435                }
     436              )
     437            );
     438          }
     439          else
     440          {
     441            var options=this.data('options');
     442            return(options.postData);
     443          }
     444        }, // postData
    414445
    415446      filter: function (value)
     
    813844          privateMethods.setLevelIndent(object, (value.levelIndent!=null)?value.levelIndent:options.levelIndent);
    814845          privateMethods.setIconWidthEC(object, (value.iconWidthEC!=null)?value.iconWidthEC:options.iconWidthEC);
     846          privateMethods.setPostData(object, (value.postData!=null)?value.postData:options.postData);
    815847          privateMethods.setServerUrl(object, (value.serverUrl!=null)?value.serverUrl:options.serverUrl);
    816848          privateMethods.setFilter(object, (value.filter!=null)?value.filter:options.filter);
     
    9681000          return(options.serverUrl);
    9691001        },
     1002
     1003      setPostData : function (object, value)
     1004        {
     1005          var properties=object.data('properties'),
     1006              options=object.data('options');
     1007
     1008          if(!properties.initialized || value!=options.postData)
     1009          {
     1010            options.postData=value;
     1011          }
     1012
     1013          return(options.postData);
     1014        }, // setPostData
    9701015
    9711016      setFilter : function (object, value)
     
    10941139                  }
    10951140                );
    1096               $(document).bind('focusout focusin',
     1141              $(document).bind('focusout.'+properties.objectId+' focusin.'+properties.objectId,
    10971142                function (event)
    10981143                {
     
    16141659                  filter:options.filter,
    16151660                  galleryRoot:options.galleryRoot?'y':'n',
    1616                   tree:'y'
     1661                  tree:'y',
     1662                  data:options.postData
    16171663                },
    16181664              success: function(msg)
  • extensions/GrumPluginClasses/js/ui.iconSelector.js

    r8961 r16012  
    22 * -----------------------------------------------------------------------------
    33 * file: ui.iconSelector.js
    4  * file version: 1.0.0
    5  * date: 2010-10-10
     4 * file version: 1.0.1
     5 * date: 2012-06-18
    66 *
    77 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses"
     
    1111 *   email    : grum@piwigo.com
    1212 *   website  : http://photos.grum.fr
    13  *   PWG user : http://forum.phpwebgallery.net/profile.php?id=3706
    1413 *
    1514 *   << May the Little SpaceFrog be with you ! >>
     
    8786 * | 1.0.0   | 2010/10/10 | first release
    8887 * |         |            |
     88 * | 1.0.1   | 2012/06/18 | * imoprove memory managment
    8989 * |         |            |
    9090 * |         |            |
     
    220220              $this
    221221                .unbind('.iconSelector')
     222                .removeData()
    222223                .css(
    223224                  {
     
    227228                  }
    228229                );
     230              delete $this;
    229231            }
    230232          );
  • extensions/GrumPluginClasses/js/ui.inputCheckbox.js

    r8961 r16012  
    22 * -----------------------------------------------------------------------------
    33 * file: ui.inputCheckbox.js
    4  * file version: 1.0.0
    5  * date: 2010-11-04
     4 * file version: 1.0.1
     5 * date: 2012-06-18
    66 *
    77 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses"
     
    1111 *   email    : grum@piwigo.com
    1212 *   website  : http://photos.grum.fr
    13  *   PWG user : http://forum.phpwebgallery.net/profile.php?id=3706
    1413 *
    1514 *   << May the Little SpaceFrog be with you ! >>
     
    2221 *
    2322 * | release | date       |
    24  * | 1.0.0   | 2010/11/04 | first release
     23 * | 1.0.0   | 2010/11/04 | * first release
    2524 * |         |            |
    26  * |         |            |
     25 * | 1.0.1   | 2012/06/18 | * improve memory managment
    2726 * |         |            |
    2827 * |         |            |
     
    5352                  properties = $this.data('properties'),
    5453                  options =
    55                     {                     
     54                    {
    5655                      values:
    5756                        {
     
    111110            {
    112111              // default values for the plugin
    113               var properties=this.data('properties');
     112              var $this=$(this),
     113                  properties=$this.data('properties');
    114114              properties.checkboxList.unbind('.inputCheckbox');
    115               this.removeClass('ui-inputCheckbox');
     115
     116              $this
     117                .unbind('.inputCheckbox')
     118                .removeData()
     119                .removeClass('ui-inputCheckbox');
     120              delete $this;
    116121            }
    117122          );
     
    416421                  break;
    417422              }
    418             } 
     423            }
    419424            else if($.isArray(value) && !properties.isCB)
    420425            {
     
    425430               */
    426431              properties.checkboxList.attr('checked', false);
    427              
     432
    428433              for(var i=0;i<value.length;i++)
    429434              {
     
    437442                }
    438443              }
    439              
    440             }
    441             else 
     444
     445            }
     446            else
    442447            {
    443448              // a single value
    444              
     449
    445450              if(options.values.checked==value)
    446451              {
     
    453458                  if(id=='')
    454459                  {
    455                     properties.checkboxList.attr('checked', true); 
     460                    properties.checkboxList.attr('checked', true);
    456461                  }
    457462                  else
     
    471476                  if(id=='')
    472477                  {
    473                     properties.checkboxList.attr('checked', false); 
     478                    properties.checkboxList.attr('checked', false);
    474479                  }
    475480                  else
  • extensions/GrumPluginClasses/js/ui.inputColorPicker.js

    r8961 r16012  
    22 * -----------------------------------------------------------------------------
    33 * file: ui.inputColorPicker.js
    4  * file version: 1.0.0
    5  * date: 2010-11-04
     4 * file version: 1.0.1
     5 * date: 2012-06-18
    66 *
    77 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses"
     
    1111 *   email    : grum@piwigo.com
    1212 *   website  : http://photos.grum.fr
    13  *   PWG user : http://forum.phpwebgallery.net/profile.php?id=3706
    1413 *
    1514 *   << May the Little SpaceFrog be with you ! >>
     
    2221 *
    2322 * | release | date       |
    24  * | 1.0.0   | 2010/11/04 | first release
     23 * | 1.0.0   | 2010/11/04 | * first release
    2524 * |         |            |
    26  * |         |            |
     25 * | 1.0.1   | 2012/06/18 | * improve memory managment
    2726 * |         |            |
    2827 * |         |            |
     
    201200                    numDec:0,
    202201                    unitValue:'',
    203                     btInc:'+',
    204                     btDec:'-',
     202                    //btInc:'+',
     203                    //btDec:'-',
    205204                    value:0,
    206205                    showSlider:'auto',
     
    218217                    numDec:0,
    219218                    unitValue:'',
    220                     btInc:'+',
    221                     btDec:'-',
     219                    //btInc:'+',
     220                    //btDec:'-',
    222221                    value:0,
    223222                    showSlider:'auto',
     
    235234                    numDec:0,
    236235                    unitValue:'',
    237                     btInc:'+',
    238                     btDec:'-',
     236                    //btInc:'+',
     237                    //btDec:'-',
    239238                    value:0,
    240239                    showSlider:'auto',
     
    252251                    numDec:0,
    253252                    unitValue:'',
    254                     btInc:'+',
    255                     btDec:'-',
     253                    //btInc:'+',
     254                    //btDec:'-',
    256255                    value:0,
    257256                    showSlider:'auto',
     
    269268                    numDec:0,
    270269                    unitValue:'',
    271                     btInc:'+',
    272                     btDec:'-',
     270                    //btInc:'+',
     271                    //btDec:'-',
    273272                    value:0,
    274273                    showSlider:'auto',
     
    286285                    numDec:0,
    287286                    unitValue:'',
    288                     btInc:'+',
    289                     btDec:'-',
     287                    //btInc:'+',
     288                    //btDec:'-',
    290289                    value:0,
    291290                    showSlider:'auto',
     
    303302                    numDec:0,
    304303                    unitValue:'',
    305                     btInc:'+',
    306                     btDec:'-',
     304                    //btInc:'+',
     305                    //btDec:'-',
    307306                    value:0,
    308307                    showSlider:'auto',
     
    373372              objects.inputContainer.remove();
    374373              objects.container.remove();
     374
     375              $this
     376                .unbind()
     377                .removeData();
     378
     379              delete $this;
    375380            }
    376381          );
     
    11151120                    {
    11161121                      objects.colorPicker.inputColorPicker('destroy').remove();
    1117                       $(this).dialog('destroy');
     1122                      $(this).dialog('destroy').remove();
    11181123                    }
    11191124          };
     
    11211126      if(options.modal)
    11221127      {
    1123         dialogOpt.buttons=
    1124           {
    1125             'ok' : function (event)
    1126                       {
    1127                         if(options.change)
    1128                         {
    1129                           if(options.mode==1)
    1130                           {
    1131                             options.change(event, objects.colorPicker.inputColorPicker('colors').fg );
    1132                           }
    1133                           else
    1134                           {
    1135                             options.change(event, objects.colorPicker.inputColorPicker('colors') );
    1136                           }
    1137                         }
    1138                         $(this).dialog('close');
    1139                       },
    1140             'cancel' : function (event)
    1141                       {
    1142                         $(this).dialog('close');
    1143                       }
     1128        dialogOpt.buttons[options.buttons.ok]=function (event)
     1129          {
     1130            if(options.change)
     1131            {
     1132              if(options.mode==1)
     1133              {
     1134                options.change(event, objects.colorPicker.inputColorPicker('colors').fg );
     1135              }
     1136              else
     1137              {
     1138                options.change(event, objects.colorPicker.inputColorPicker('colors') );
     1139              }
     1140            }
     1141            $(this).dialog('close');
    11441142          };
     1143
     1144        dialogOpt.buttons[options.buttons.cancel]=function (event)
     1145          {
     1146            $(this).dialog('close');
     1147          };
     1148
    11451149        dialogOpt.open= function ()
    11461150          {
  • extensions/GrumPluginClasses/js/ui.inputColorsFB.js

    r8961 r16012  
    22 * -----------------------------------------------------------------------------
    33 * file: ui.inputColorsFB.js
    4  * file version: 1.0.0
    5  * date: 2010-11-04
     4 * file version: 1.0.1
     5 * date: 2012-06-18
    66 *
    77 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses"
     
    1111 *   email    : grum@piwigo.com
    1212 *   website  : http://photos.grum.fr
    13  *   PWG user : http://forum.phpwebgallery.net/profile.php?id=3706
    1413 *
    1514 *   << May the Little SpaceFrog be with you ! >>
     
    2423 * | 1.0.0   | 2010/11/04 | first release
    2524 * |         |            |
    26  * |         |            |
     25 * | 1.0.1   | 2012/06/18 | * improve memory managment
    2726 * |         |            |
    2827 * |         |            |
     
    155154              var $this=$(this),
    156155                  objects = $this.data('objects');
    157               objects.dot.remove();
     156              objects.fg.remove();
     157              objects.bg.remove();
     158              objects.fgopacity.remove();
     159              objects.bgopacity.remove();
    158160              objects.container.unbind().remove();
    159161              $this
    160162                .unbind('.inputColorsFB')
     163                .removeData()
    161164                .css(
    162165                  {
     
    165168                  }
    166169                );
     170              delete $this;
    167171            }
    168172          );
  • extensions/GrumPluginClasses/js/ui.inputConsole.js

    r12215 r16012  
    33 * file: ui.inputConsole.js
    44 * file version: 1.0.1
    5  * date: 2010-11-05
     5 * date: 2012-06-18
    66 *
    77 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses"
     
    1111 *   email    : grum@piwigo.com
    1212 *   website  : http://photos.grum.fr
    13  *   PWG user : http://forum.phpwebgallery.net/profile.php?id=3706
    1413 *
    1514 *   << May the Little SpaceFrog be with you ! >>
     
    2423 * | 1.0.0   | 2010/10/10 | first release
    2524 * |         |            |
    26  * |         |            |
     25 * | 1.0.1   | 2012/06/18 | * improve memory managment
    2726 * |         |            |
    2827 * |         |            |
     
    207206                  objects = $this.data('objects');
    208207              objects.input.unbind().remove();
     208              objects.prompt.unbind().remove();
     209              objects.inputContainer.unbind().remove();
     210              objects.historyList.unbind().remove();
     211              objects.historyListContainer.unbind().remove();
     212              objects.historyBackground.unbind().remove();
     213              objects.historyContainer.unbind().remove();
    209214              objects.container.unbind().remove();
    210215              $this
    211216                .unbind('.inputConsole')
     217                .removeData()
    212218                .css(
    213219                  {
     
    216222                  }
    217223                );
     224              delete $this;
    218225            }
    219226          );
  • extensions/GrumPluginClasses/js/ui.inputDotArea.js

    r8961 r16012  
    22 * -----------------------------------------------------------------------------
    33 * file: ui.inputDotArea.js
    4  * file version: 1.0.0
    5  * date: 2010-11-04
     4 * file version: 1.0.1
     5 * date: 2012-06-18
    66 *
    77 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses"
     
    1111 *   email    : grum@piwigo.com
    1212 *   website  : http://photos.grum.fr
    13  *   PWG user : http://forum.phpwebgallery.net/profile.php?id=3706
    1413 *
    1514 *   << May the Little SpaceFrog be with you ! >>
     
    2423 * | 1.0.0   | 2010/11/04 | first release
    2524 * |         |            |
    26  * |         |            |
     25 * | 1.0.1   | 2012/06/18 | * improve memory managment
    2726 * |         |            |
    2827 * |         |            |
     
    149148              $this
    150149                .unbind('.inputDotArea')
     150                .removeData()
    151151                .css(
    152152                  {
     
    155155                  }
    156156                );
     157              delete $this;
    157158            }
    158159          );
  • extensions/GrumPluginClasses/js/ui.inputList.js

    r15340 r16012  
    1111 *   email    : grum@piwigo.com
    1212 *   website  : http://photos.grum.fr
    13  *   PWG user : http://forum.phpwebgallery.net/profile.php?id=3706
    1413 *
    1514 *   << May the Little SpaceFrog be with you ! >>
     
    2423 * | 1.0.0   | 2010/10/10 | first release
    2524 * |         |            |
    26  * | 1.0.1   | 2012/05/25 | fix bug with jquery 1.7.2
    27  * |         |            |  . display list now works :)
     25 * | 1.0.1   | 2012/06/18 | * fix bug with jquery 1.7.2
     26 * |         |            |   . display list now works :)
    2827 * |         |            |
     28 * |         |            | * improve memory managment
    2929 * |         |            |
    3030 * |         |            |
     
    4949              // default values for the plugin
    5050              var $this=$(this),
     51                  timeStamp=new Date(),
    5152                  data = $this.data('options'),
    5253                  objects = $this.data('objects'),
     
    5556                    {
    5657                      serverUrl:'',
     58                      postData:{},
    5759                      autoLoad:true,
    5860                      listMaxWidth:0,
    5961                      listMaxHeight:0,
    6062                      multiple:false,
    61                       downArrow:'&dArr;',
     63                      downArrow:'', //&dArr;
    6264                      popupMode:'click',
    6365                      colsWidth:[],
     
    8082                $this.data('properties',
    8183                  {
     84                    objectId:'il'+Math.ceil(timeStamp.getTime()*Math.random()),
    8285                    index:-1,
    8386                    initialized:false,
     
    204207              // default values for the plugin
    205208              var $this=$(this),
     209                  properties = $this.data('properties'),
    206210                  objects = $this.data('objects');
    207211              objects.container.unbind().remove();
    208212              objects.list.children().unbind();
    209               objects.listContainer.remove();
     213              objects.listContainer.unbind().remove();
     214              $(document).unbind('focusout.'+properties.objectId+' focusin.'+properties.objectId);
    210215              $this
     216                .removeData()
    211217                .unbind('.inputList')
    212218                .css(
     
    216222                  }
    217223                );
     224              delete $this;
    218225            }
    219226          );
     
    328335          }
    329336        }, // serverUrl
     337
     338      postData: function (value)
     339        {
     340          if(value!=null)
     341          {
     342            // set selected value
     343            return(
     344              this.each(
     345                function()
     346                {
     347                  privateMethods.setPostData($(this), value, true);
     348                }
     349              )
     350            );
     351          }
     352          else
     353          {
     354            var options=this.data('options');
     355            return(options.postData);
     356          }
     357        }, // postData
    330358
    331359      cols: function ()
     
    747775          privateMethods.setListMaxWidth(object, (value.listMaxWidth!=null)?value.listMaxWidth:options.listMaxWidth);
    748776          privateMethods.setListMaxHeight(object, (value.listMaxHeight!=null)?value.listMaxHeight:options.listMaxHeight);
     777          privateMethods.setPostData(object, (value.postData!=null)?value.postData:options.postData);
    749778          privateMethods.setServerUrl(object, (value.serverUrl!=null)?value.serverUrl:options.serverUrl);
    750779          privateMethods.setPopupMode(object, (value.popupMode!=null)?value.popupMode:options.popupMode);
     
    759788          privateMethods.setMultiple(object, (value.multiple!=null)?value.multiple:options.multiple); // can be set only at the initialization
    760789
    761           if(options.autoLoad) privateMethods.load(object);
     790          if(options.autoLoad && options.serverUrl!='')
     791          {
     792            privateMethods.load(object, (value.value!=null)?value.value:null);
     793          }
     794          else
     795          {
     796            privateMethods.setValue(object, (value.value!=null)?value.value:null);
     797          }
    762798
    763799          properties.initialized=true;
     
    899935          return(options.serverUrl);
    900936        },
     937
     938      setPostData : function (object, value)
     939        {
     940          var properties=object.data('properties'),
     941              options=object.data('options');
     942
     943          if(!properties.initialized || value!=options.postData)
     944          {
     945            options.postData=value;
     946          }
     947
     948          return(options.postData);
     949        }, // setPostData
    901950
    902951      setMultiple : function (object, value)
     
    9741023                  }
    9751024                );
    976               $(document).bind('focusout focusin',
    977                 function (event)
    978                 {
    979                   if(!properties.mouseOver) privateMethods.displaySelector(object, false);
    980                   event.stopPropagation();
    981                 }
     1025                $(document).bind('focusout.'+properties.objectId+' focusin.'+properties.objectId,
     1026                  function (event)
     1027                  {
     1028                    if($.isPlainObject(properties) && !properties.mouseOver) privateMethods.displaySelector(object, false);
     1029                    event.stopPropagation();
     1030                  }
    9821031              );
    9831032            }
     
    12971346        },
    12981347
    1299       load : function (object)
     1348      load : function (object, defaultValue)
    13001349        {
    13011350          // load datas from server through an asynchronous ajax call
     
    13101359              type: "POST",
    13111360              url: options.serverUrl,
     1361              data:options.postData,
    13121362              async: true,
    13131363              success: function(msg)
     
    13181368                  if(options.multiple)
    13191369                  {
    1320                     privateMethods.setValue(object, ':none');
     1370                    if(defaultValue!=null)
     1371                    {
     1372                      privateMethods.setValue(object, defaultValue);
     1373                    }
     1374                    else
     1375                    {
     1376                      privateMethods.setValue(object, ':none');
     1377                    }
    13211378                  }
    13221379                  else
    13231380                  {
    1324                     privateMethods.setValue(object, ':first');
     1381                    if(defaultValue!=null)
     1382                    {
     1383                      privateMethods.setValue(object, defaultValue);
     1384                    }
     1385                    else
     1386                    {
     1387                      privateMethods.setValue(object, ':first');
     1388                    }
    13251389                  }
    13261390                  properties.initialized=true;
  • extensions/GrumPluginClasses/js/ui.inputNum.js

    r8961 r16012  
    22 * -----------------------------------------------------------------------------
    33 * file: ui.inputNum.js
    4  * file version: 1.0.0
    5  * date: 2010-11-02
     4 * file version: 1.0.1
     5 * date: 2012-06-18
    66 *
    77 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses"
     
    1111 *   email    : grum@piwigo.com
    1212 *   website  : http://photos.grum.fr
    13  *   PWG user : http://forum.phpwebgallery.net/profile.php?id=3706
    1413 *
    1514 *   << May the Little SpaceFrog be with you ! >>
     
    2423 * | 1.0.0   | 2010/10/10 | first release
    2524 * |         |            |
     25 * | 1.0.1   | 2012/06/18 | * improve memory managment
    2626 * |         |            |
    2727 * |         |            |
     
    6060                      disabled:false,
    6161                      textAlign:'right',
    62                       btInc:'+',
    63                       btDec:'-',
     62                      btInc:'', // +
     63                      btDec:'', // -
    6464                      unitValue:'',
    6565                      change:null
     
    226226              $this
    227227                .unbind('.inputNum')
     228                .removeData()
    228229                .css(
    229230                  {
     
    232233                  }
    233234                );
     235              delete $this;
    234236            }
    235237          );
     
    647649          var objects=object.data('objects'),
    648650              properties=object.data('properties');
     651
     652          if(value=='check')
     653            value=privateMethods.isValid(object, properties.value);
    649654
    650655          if(properties.isValid!=value)
     
    10431048        {
    10441049          var objects=object.data('objects'),
    1045               properties=object.data('properties');         
    1046          
     1050              properties=object.data('properties');
     1051
    10471052          objects.input.css('width', (objects.container.width()-objects.extraContainer.outerWidth()-properties.inputMargins)+'px');
    10481053        }
  • extensions/GrumPluginClasses/js/ui.inputPosition.js

    r8961 r16012  
    22 * -----------------------------------------------------------------------------
    33 * file: ui.inputPosition.js
    4  * file version: 1.0.0
    5  * date: 2010-11-05
     4 * file version: 1.0.1
     5 * date: 2012-06-18
    66 *
    77 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses"
     
    1111 *   email    : grum@piwigo.com
    1212 *   website  : http://photos.grum.fr
    13  *   PWG user : http://forum.phpwebgallery.net/profile.php?id=3706
    1413 *
    1514 *   << May the Little SpaceFrog be with you ! >>
     
    2423 * | 1.0.0   | 2010/10/10 | first release
    2524 * |         |            |
     25 * | 1.0.1   | 2012/06/18 | * improve memory managment
    2626 * |         |            |
    2727 * |         |            |
     
    183183              $this
    184184                .unbind('.inputPosition')
     185                .removeData()
    185186                .css(
    186187                  {
     
    189190                  }
    190191                );
     192              delete $this;
    191193            }
    192194          );
  • extensions/GrumPluginClasses/js/ui.inputRadio.js

    r8961 r16012  
    22 * -----------------------------------------------------------------------------
    33 * file: ui.inputRadio.js
    4  * file version: 1.0.0
    5  * date: 2010-11-04
     4 * file version: 1.0.1
     5 * date: 2012-06-18
    66 *
    77 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses"
     
    1111 *   email    : grum@piwigo.com
    1212 *   website  : http://photos.grum.fr
    13  *   PWG user : http://forum.phpwebgallery.net/profile.php?id=3706
    1413 *
    1514 *   << May the Little SpaceFrog be with you ! >>
     
    2423 * | 1.0.0   | 2010/11/04 | first release
    2524 * |         |            |
     25 * | 1.0.1   | 2012/06/18 | * improve memory managment
    2626 * |         |            |
    2727 * |         |            |
     
    119119              $this
    120120                .unbind('.inputRadio')
     121                .removeData()
    121122                .css(
    122123                  {
     
    125126                  }
    126127                );
     128              delete $this;
    127129            }
    128130          );
  • extensions/GrumPluginClasses/js/ui.inputStatusBar.js

    r8961 r16012  
    22 * -----------------------------------------------------------------------------
    33 * file: ui.inputStatusBar.js
    4  * file version: 1.0.0
    5  * date: 2010-11-04
     4 * file version: 1.0.1
     5 * date: 2012-06-18
    66 *
    77 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses"
     
    1111 *   email    : grum@piwigo.com
    1212 *   website  : http://photos.grum.fr
    13  *   PWG user : http://forum.phpwebgallery.net/profile.php?id=3706
    1413 *
    1514 *   << May the Little SpaceFrog be with you ! >>
     
    2423 * | 1.0.0   | 2010/11/04 | first release
    2524 * |         |            |
    26  * |         |            |
     25 * | 1.0.1   | 2012/06/18 | * improve memory managment
    2726 * |         |            |
    2827 * |         |            |
     
    115114              var $this=$(this),
    116115                  objects = $this.data('objects');
     116
    117117              objects.tr.remove();
    118118              objects.table.remove();
    119119              $this
    120120                .unbind('.inputStatusBar')
     121                .removeData()
    121122                .css(
    122123                  {
     
    125126                  }
    126127                );
     128              delete $this;
    127129            }
    128130          );
  • extensions/GrumPluginClasses/js/ui.inputSwitchButton.js

    r12215 r16012  
    11/**
    22 * -----------------------------------------------------------------------------
    3  * file: ui.inputCheckbox.js
    4  * file version: 1.0.0
    5  * date: 2011-06-18
     3 * file: ui.inputSwitchButton.js
     4 * file version: 1.0.1
     5 * date: 2012-06-18
    66 *
    77 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses"
     
    1111 *   email    : grum@piwigo.com
    1212 *   website  : http://photos.grum.fr
    13  *   PWG user : http://forum.phpwebgallery.net/profile.php?id=3706
    1413 *
    1514 *   << May the Little SpaceFrog be with you ! >>
     
    2423 * | 1.0.0   | 2011/06/18 | first release
    2524 * |         |            |
    26  * |         |            |
     25 * | 1.0.1   | 2012/06/18 | * improve memory managment
    2726 * |         |            |
    2827 * |         |            |
     
    5352                  properties = $this.data('properties'),
    5453                  options =
    55                     {                     
     54                    {
    5655                      values:
    5756                        {
     
    9998            {
    10099              // default values for the plugin
    101               var properties=this.data('properties');
    102               $this.unbind('.inputSwitchButton');
    103               this.removeClass('ui-inputSwitchButton');
     100              var $this=$(this);
     101
     102              $this
     103                .unbind('.inputSwitchButton')
     104                .removeData()
     105                .removeClass('ui-inputSwitchButton ui-inputSwitchButton-unchecked ui-inputSwitchButton-checked');
     106              delete $this;
    104107            }
    105108          );
     
    136139          }
    137140        }, // disabled
    138        
     141
    139142      values: function (values)
    140143        {
     
    191194          {
    192195            var options = this.data('options');
    193            
     196
    194197            return(properties.checked?options.values.checked:options.values.unchecked);
    195198          }
     
    283286          return(options.values);
    284287        }, //setValues
    285        
    286        
     288
     289
    287290      setGroup: function (object, value)
    288291        {
     
    298301              if(listGroup==null) listGroup=[];
    299302              p=$.inArray(object.attr('id'), listGroup);
    300               if(p>-1) listGroup.splice(p,1);             
     303              if(p>-1) listGroup.splice(p,1);
    301304              $(document).data('isbGroup_'+options.group, listGroup);
    302             }           
     305            }
    303306            options.group=value;
    304307            listGroup=$(document).data('isbGroup_'+value);
     
    307310            $(document).data('isbGroup_'+value, listGroup);
    308311          }
    309         },       
    310        
     312        },
     313
    311314      switchValue: function (object)
    312315        {
     
    340343              }
    341344            }
    342            
     345
    343346            object
    344347              .addClass('ui-inputSwitchButton-checked')
  • extensions/GrumPluginClasses/js/ui.inputText.js

    r15373 r16012  
    22 * -----------------------------------------------------------------------------
    33 * file: ui.inputText.js
    4  * file version: 1.1.1
    5  * date: 2011-01-09
     4 * file version: 1.1.2
     5 * date: 2012-06-18
    66 *
    77 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses"
     
    1111 *   email    : grum@piwigo.com
    1212 *   website  : http://photos.grum.fr
    13  *   PWG user : http://forum.phpwebgallery.net/profile.php?id=3706
    1413 *
    1514 *   << May the Little SpaceFrog be with you ! >>
     
    3130 * | 1.1.1   | 2011/01/31 | * add function ':clear' for 'languagesValues' method
    3231 * |         |            |
     32 * | 1.1.2   | 2012/06/18 | * improve memory managment
    3333 * |         |            |
    34  * |         |            |
     34 * |         |            | * fix bug on regExp option
    3535 * |         |            |
    3636 * |         |            |
     
    139139              $this
    140140                .unbind('.inputText')
     141                .removeData()
    141142                .css(
    142143                  {
     
    145146                  }
    146147                );
     148              delete $this;
    147149            }
    148150          );
     
    539541          var properties=object.data('properties');
    540542
    541           return(properties.re.exec(value))
     543          return(properties.re.test(value));
    542544        },
    543545
     
    570572          privateMethods.setTextAlign(object, (value.textAlign!=null)?value.textAlign:options.textAlign);
    571573
     574          privateMethods.setDisabled(object, (value.disabled!=null)?value.disabled:options.disabled);
     575
    572576          privateMethods.setEventChange(object, (value.change!=null)?value.change:options.change);
    573577
     
    598602          var objects=object.data('objects'),
    599603              properties=object.data('properties');
     604
     605          if(value=='check')
     606            value=privateMethods.isValid(object, properties.value);
    600607
    601608          if(properties.isValid!=value && properties.initialized)
     
    892899          }
    893900
    894           privateMethods.setIsValid(object, true);
     901          privateMethods.setIsValid(object, privateMethods.isValid(object, value));
    895902
    896903          properties.value=value;
Note: See TracChangeset for help on using the changeset viewer.