Changeset 10884


Ignore:
Timestamp:
May 15, 2011, 7:42:12 PM (9 years ago)
Author:
grum
Message:

fix bug:2302 - release 3.5.1

Location:
extensions/GrumPluginClasses
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • extensions/GrumPluginClasses/classes/GPCRequestBuilder.class.inc.php

    r10246 r10884  
    22/* -----------------------------------------------------------------------------
    33  class name: GCPRequestBuilder
    4   class version  : 1.1.5
    5   plugin version : 3.4.3
    6   date           : 2010-09-08
     4  class version  : 1.1.6
     5  plugin version : 3.5.1
     6  date           : 2011-05-15
    77
    88  ------------------------------------------------------------------------------
     
    8686| 1.1.5   | 2011/04/10 | * Compatibility with piwigo 2.2
    8787|         |            |
    88 |         |            |
     88| 1.1.6   | 2011/05/15 | * mantis bug:2302
     89|         |            |   . Request builder user interface don't work
    8990|         |            |
    9091|         |            |
     
    541542    $baseName=basename(dirname(dirname(__FILE__))).'/js/';
    542543    GPCCore::addHeaderJS('jquery', 'themes/default/js/jquery.min.js');
    543     GPCCore::addHeaderJS('gpc.interface', 'plugins/'.$baseName.'external/interface/interface.js', array('jquery'));
    544     GPCCore::addHeaderJS('gpc.inestedsortable', 'plugins/'.$baseName.'external/inestedsortable.pack.js', array('jquery', 'gpc.interface'));
    545     GPCCore::addHeaderJS('gpc.rbCriteriaBuilder', 'plugins/'.$baseName.'rbCriteriaBuilder'.GPCCore::getMinified().'.js', array('gpc.inestedsortable'));
     544    GPCCore::addHeaderJS('gpc.external.inestedsortable', 'plugins/'.$baseName.'external/iNestedSortablePack'.GPCCore::getMinified().'.js', array('jquery', 'jquery.ui'));
     545    GPCCore::addHeaderJS('gpc.rbCriteriaBuilder', 'plugins/'.$baseName.'rbCriteriaBuilder'.GPCCore::getMinified().'.js', array('gpc.external.inestedsortable'));
    546546
    547547    $template->append('head_elements',
     
    13951395    $filter=array_flip($filter);
    13961396
    1397     GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/packed/ui.core.packed.js');
    1398     GPCCore::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/packed/ui.dialog.packed.js');
     1397    GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.packed.js');
     1398    GPCCore::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/minified/jquery.ui.dialog.packed.js');
    13991399    GPCCore::addHeaderJS('gpc.pagesNavigator', 'plugins/GrumPluginClasses/js/pagesNavigator'.GPCCore::getMinified().'.js');
    14001400    GPCCore::addHeaderJS('gpc.rbSearch', 'plugins/GrumPluginClasses/js/rbSearch'.GPCCore::getMinified().'.js');
  • extensions/GrumPluginClasses/gpc_version.inc.php

    r10246 r10884  
    1515  if(!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    1616
    17   if(!defined('GPC_VERSION')) define('GPC_VERSION',  '3.5.0');
    18   if(!defined('GPC_VERSION2')) define('GPC_VERSION2', '03.05.00');
     17  if(!defined('GPC_VERSION')) define('GPC_VERSION',  '3.5.1');
     18  if(!defined('GPC_VERSION2')) define('GPC_VERSION2', '03.05.01');
    1919?>
  • extensions/GrumPluginClasses/js/rbCriteriaBuilder.js

    r8961 r10884  
    22 * -----------------------------------------------------------------------------
    33 * file: criteriaBuilder.js
    4  * file version: 1.1.1
    5  * date: 2010-01-13
     4 * file version: 1.1.2
     5 * date: 2011-05-15
    66 *
    77 * JS file provided by the piwigo's plugin "GrumPluginClasses"
     
    6161 * |         |            |   . Incompatibility with IE8
    6262 * |         |            |
     63 * | 1.1.2   | 2011/05/15 | * fix bug:
     64 * |         |            |   . Fix some incompatibilities with IE7
     65 * |         |            |
     66 * |         |            | * fix bug:2302
     67 * |         |            |   . Request builder interface don't work
     68 * |         |            |
     69 * |         |            |
     70 * |         |            |
     71 * |         |            |
    6372 * |         |            |
    6473 *
     
    7281          group:'iCbGroup',
    7382          item:'iCbItem',
    74           container:container,
     83          container:container
    7584        },
    7685      counters = {
    7786          group:0,
    78           item:0,
     87          item:0
    7988        },
    8089      options = {
     
    100109          helpMove:'',
    101110          helpSwitchCondition:'',
    102           ajaxUrl:'',
     111          ajaxUrl:''
    103112        },
    104113      extraData = new Array();
     
    309318    {
    310319      $('#'+itemId).remove();
    311       re=/[0-9]*$/;
     320      var re=/[0-9]*$/;
    312321      extraData[eval(re.exec(itemId)[0])]=null;
    313322      manage();
     
    328337    {
    329338      $('#'+itemId+' .itemContent').html(content);
    330       re=/[0-9]*$/;
     339      var re=/[0-9]*$/;
    331340      extraData[eval(re.exec(itemId)[0])]=data;
    332341    }
     
    383392  var getItems = function()
    384393  {
    385     //group & items tree
    386     serialized=jQuery.iNestedSortable.serialize(itemsId.container)['hash'];
    387 
    388     //items extraData
    389     tmp=Array();
     394    var serialized=jQuery.iNestedSortable.serialize(itemsId.container)['hash'], //group & items tree
     395        tmp=Array(); //items extraData
     396
    390397    for(i=0;i<extraData.length;i++)
    391398    {
     
    423430  var getExtraData = function(itemId)
    424431  {
    425     re=/[0-9]*$/;
     432    var re=/[0-9]*$/;
    426433    extraDataNumber=re.exec(itemId)[0];
    427434
     
    536543        serializeRegExp:/.*/i,
    537544        autoScroll: true,
    538         handle: '.cbSortHandle',
     545        handle: '.cbSortHandle:first',
    539546        ghosting:false,
    540547        nestingPxSpace:15,
     
    543550        onChange: function(serialized) {
    544551          manage();
    545         },
     552        }
    546553      }
    547554    );
     
    555562  onSwitchOperator = function (event)
    556563  {
    557     groupId=event.data;
     564    var groupId=event.data;
    558565
    559566    if($('#'+groupId).hasClass('cbOpAND'))
     
    583590    }
    584591
    585     datas=encodeURI('ajaxfct=public.rbuilder.searchExecute&requestName='+itemsId.container+'&'+getItems());
     592    var datas=encodeURI('ajaxfct=public.rbuilder.searchExecute&requestName='+itemsId.container+'&'+getItems());
    586593    $.ajax(
    587594      {
     
    597604          {
    598605            if(options.onRequestError!=null && jQuery.isFunction(options.onRequestError)) options.onRequestError(msg);
    599           },
     606          }
    600607       }
    601608     );
     
    622629          {
    623630            if(options.onGetPageError!=null && jQuery.isFunction(options.onGetPageError)) options.onGetPageError(msg);
    624           },
     631          }
    625632       }
    626633     );
     
    637644    {
    638645      owner:owner,
    639       param:data,
     646      param:data
    640647    }
    641648  );
  • extensions/GrumPluginClasses/js/rbCriteriaBuilder.min.js

    r8961 r10884  
    1 /* file: rbCriteriaBuilder.js - v1.1.1 | minified on 2011/01/27 with http://jscompress.com/ */
     1/* file: rbCriteriaBuilder.js - v1.1.2 | minified on 2011/05/15 with http://jscompress.com/ */
    22function criteriaBuilder(container)
    3 {var itemsId={group:'iCbGroup',item:'iCbItem',container:container,},counters={group:0,item:0,},options={textAND:'AND',textOR:'OR',textNoCriteria:'There is no criteria ! At least, one criteria is required to do search...',textHint:'',textSomethingWrong:'An error has occured on the server-side',textCaddieUpdated:'Caddie was updated',classGroup:'',classItem:'',classOperator:'',classHelper:'helper',opacity:0.8,onEdit:null,onDelete:null,onRequestSuccess:null,onRequestError:null,onGetPageSuccess:null,onGetPageError:null,helpEditUrl:'',helpDeleteUrl:'',helpMove:'',helpSwitchCondition:'',ajaxUrl:'',},extraData=new Array();if(arguments.length==2)
     3{var itemsId={group:'iCbGroup',item:'iCbItem',container:container},counters={group:0,item:0},options={textAND:'AND',textOR:'OR',textNoCriteria:'There is no criteria ! At least, one criteria is required to do search...',textHint:'',textSomethingWrong:'An error has occured on the server-side',textCaddieUpdated:'Caddie was updated',classGroup:'',classItem:'',classOperator:'',classHelper:'helper',opacity:0.8,onEdit:null,onDelete:null,onRequestSuccess:null,onRequestError:null,onGetPageSuccess:null,onGetPageError:null,helpEditUrl:'',helpDeleteUrl:'',helpMove:'',helpSwitchCondition:'',ajaxUrl:''},extraData=new Array();if(arguments.length==2)
    44{if(typeof arguments[1]=='object')
    55{options=jQuery.extend(options,arguments[1]);}}
     
    2828{counters.item++;var content="<li id='"+itemsId.item+counters.item+"' class='cbItem cbSortable "+options.classItem+"'>";content+="<div class='cbItemButtons' style='float:right;'>";if(options.onEdit!=null&&jQuery.isFunction(options.onEdit))content+="<div class='iconEdit' id='iImgEdit"+counters.item+"' title=\""+options.helpEdit+"\"></div>";if(options.onDelete!=null&&jQuery.isFunction(options.onDelete))content+="<div class='iconDelete' id='iImgDelete"+counters.item+"' title=\""+options.helpDelete+"\"></div>";content+="</div><div class='cbSortHandle'>";content+="<div class='cbItemButtons' style='float:left;'> <div class='iconMove' id='iImgMoveItem"+counters.item+"' title=\""+options.helpMove+"\"></div></div>";content+="<div class='itemContent'>"+itemContent+"</div></div></li>";$('#'+itemsId.container).append(content);addGroup(itemsId.item+counters.item);if(options.onEdit!=null)$('#iImgEdit'+counters.item).bind('click',itemsId.item+counters.item,options.onEdit);if(options.onDelete!=null)$('#iImgDelete'+counters.item).bind('click',itemsId.item+counters.item,options.onDelete);extraData[counters.item]=data;};var deleteItem=function(itemId)
    2929{if($('#'+itemId).length!=0)
    30 {$('#'+itemId).remove();re=/[0-9]*$/;extraData[eval(re.exec(itemId)[0])]=null;manage();}};var editItem=function(itemId,content,data)
     30{$('#'+itemId).remove();var re=/[0-9]*$/;extraData[eval(re.exec(itemId)[0])]=null;manage();}};var editItem=function(itemId,content,data)
    3131{if($('#'+itemId).length!=0)
    32 {$('#'+itemId+' .itemContent').html(content);re=/[0-9]*$/;extraData[eval(re.exec(itemId)[0])]=data;}};var clearItems=function()
     32{$('#'+itemId+' .itemContent').html(content);var re=/[0-9]*$/;extraData[eval(re.exec(itemId)[0])]=data;}};var clearItems=function()
    3333{$('#'+itemsId.container).NestedSortableDestroy();$('#'+itemsId.container).html("");counters.item=0;counters.group=0;extraData=new Array();};var serializeData=function(prefix,value)
    3434{var returned='';if(typeof value=='object')
     
    4141{returned+='&'+prefix+'='+value;}
    4242return(returned);};var getItems=function()
    43 {serialized=jQuery.iNestedSortable.serialize(itemsId.container)['hash'];tmp=Array();for(i=0;i<extraData.length;i++)
     43{var serialized=jQuery.iNestedSortable.serialize(itemsId.container)['hash'],tmp=Array();for(i=0;i<extraData.length;i++)
    4444{if(extraData[i]!=null)
    4545{serialized+=serializeData('extraData['+i+']',extraData[i]);}}
     
    4949else
    5050{serialized+='AND';}});return(serialized);};var getExtraData=function(itemId)
    51 {re=/[0-9]*$/;extraDataNumber=re.exec(itemId)[0];return(extraData[extraDataNumber]);};var setOptions=function(optionsToSet)
     51{var re=/[0-9]*$/;extraDataNumber=re.exec(itemId)[0];return(extraData[extraDataNumber]);};var setOptions=function(optionsToSet)
    5252{options=jQuery.extend(options,optionsToSet);};var displayOperator=function(groupId,visible)
    5353{if($('#'+groupId).hasClass('cbOpAND'))
     
    7676{if($(this).parent().get(0).id==itemsId.container)
    7777{addGroup(this.id);}}});};var applyNested=function()
    78 {$('#'+itemsId.container).NestedSortableDestroy();$('#'+itemsId.container).NestedSortable({accept:'cbSortable',noNestingClass:'cbItem',opacity:options.opacity,helperclass:options.classHelper,serializeRegExp:/.*/i,autoScroll:true,handle:'.cbSortHandle',ghosting:false,nestingPxSpace:15,currentNestingClass:'cbItemOverGroup',onChange:function(serialized){manage();},});};onSwitchOperator=function(event)
    79 {groupId=event.data;if($('#'+groupId).hasClass('cbOpAND'))
     78{$('#'+itemsId.container).NestedSortableDestroy();$('#'+itemsId.container).NestedSortable({accept:'cbSortable',noNestingClass:'cbItem',opacity:options.opacity,helperclass:options.classHelper,serializeRegExp:/.*/i,autoScroll:true,handle:'.cbSortHandle:first',ghosting:false,nestingPxSpace:15,currentNestingClass:'cbItemOverGroup',onChange:function(serialized){manage();}});};onSwitchOperator=function(event)
     79{var groupId=event.data;if($('#'+groupId).hasClass('cbOpAND'))
    8080{$('#'+groupId).removeClass('cbOpAND').addClass('cbOpOR');$('#'+groupId+'OpAND').css('display','none');$('#'+groupId+'OpOR').css('display','block');}
    8181else
     
    8383{if(extraData.length==0)
    8484{alert(options.textNoCriteria);return(false);}
    85 datas=encodeURI('ajaxfct=public.rbuilder.searchExecute&requestName='+itemsId.container+'&'+getItems());$.ajax({type:"POST",url:options.ajaxUrl,async:true,data:datas,success:function(msg)
     85var datas=encodeURI('ajaxfct=public.rbuilder.searchExecute&requestName='+itemsId.container+'&'+getItems());$.ajax({type:"POST",url:options.ajaxUrl,async:true,data:datas,success:function(msg)
    8686{if(options.onRequestSuccess!=null&&jQuery.isFunction(options.onRequestSuccess))options.onRequestSuccess(msg);},error:function(msg)
    87 {if(options.onRequestError!=null&&jQuery.isFunction(options.onRequestError))options.onRequestError(msg);},});};var getPage=function(requestNumber,pageNumber,numberPerPage)
     87{if(options.onRequestError!=null&&jQuery.isFunction(options.onRequestError))options.onRequestError(msg);}});};var getPage=function(requestNumber,pageNumber,numberPerPage)
    8888{$.ajax({type:"POST",url:options.ajaxUrl,async:true,data:{ajaxfct:'public.rbuilder.searchGetPage',page:pageNumber,requestNumber:requestNumber,numPerPage:numberPerPage},success:function(msg)
    8989{if(options.onGetPageSuccess!=null&&jQuery.isFunction(options.onGetPageSuccess))options.onGetPageSuccess(msg);},error:function(msg)
    90 {if(options.onGetPageError!=null&&jQuery.isFunction(options.onGetPageError))options.onGetPageError(msg);},});};applyNested();};criteriaBuilder.makeExtendedData=function(owner,data)
    91 {return({owner:owner,param:data,});}
     90{if(options.onGetPageError!=null&&jQuery.isFunction(options.onGetPageError))options.onGetPageError(msg);}});};applyNested();};criteriaBuilder.makeExtendedData=function(owner,data)
     91{return({owner:owner,param:data});}
  • extensions/GrumPluginClasses/js/rbSearch.js

    r7370 r10884  
    22 * -----------------------------------------------------------------------------
    33 * file: criteriaBuilderSearch.js
    4  * file version: 1.0.0
    5  * date: 2010-10-23
     4 * file version: 1.1.1
     5 * date: 2011-05-15
    66 *
    77 * JS file provided by the piwigo's plugin "GrumPluginClasses"
     
    2828 * |         |            |   request
    2929 * |         |            |
     30 * | 1.1.1   | 2011/05/15 | * fix some incompatibilities with IE7
    3031 * |         |            |
    3132 * |         |            |
     
    5152            requestResultRequestNumber:0,
    5253            onPageChange:null,
    53             numberPerPage:30,
     54            numberPerPage:30
    5455          };
    5556
     
    223224                options.onPageChange(requestNumber, page, options.numberPerPage);
    224225              }
    225             },
     226            }
    226227        }
    227228      );
     
    258259              $('#iMenuCaddieItems ul').css('display', 'block');
    259260              alert(requestBuilderOptions.textSomethingWrong);
    260             },
     261            }
    261262        }
    262263      );
     
    276277        requestResultContent:'iResultQueryContent',
    277278        requestResultNfo:'iResultQueryNfo',
    278         requestResultPagesNavigator:'iPagesNavigator',
     279        requestResultPagesNavigator:'iPagesNavigator'
    279280      }
    280281    );
  • extensions/GrumPluginClasses/js/rbSearch.min.js

    r8961 r10884  
    1 /* file: rbSearch.js - v1.0.0 | minified on 2011/01/27 with http://jscompress.com/ */
     1/* file: rbSearch.js - v1.1.1 | minified on 2011/05/15 with http://jscompress.com/ */
    22var cb=null;var interfaceManager=function(optionsToSet)
    3 {var pn=null,requestNumber=0,options={requestCriterionsVisible:'',requestCriterionsHidden:'',requestResult:'',requestResultContent:'',requestResultNfo:'',requestResultPagesNavigator:'',requestResultRequestNumber:0,onPageChange:null,numberPerPage:30,};this.doAction=function(fct)
     3{var pn=null,requestNumber=0,options={requestCriterionsVisible:'',requestCriterionsHidden:'',requestResult:'',requestResultContent:'',requestResultNfo:'',requestResultPagesNavigator:'',requestResultRequestNumber:0,onPageChange:null,numberPerPage:30};this.doAction=function(fct)
    44{switch(fct)
    55{case'queryResult':if(arguments.length==3)
     
    3030{setOptions(optionsToSet);pn=new pagesNavigator(options.requestResultPagesNavigator,{itemPerPage:options.numberPerPage,displayNumPage:9,classActive:'pnActive',classInactive:'pnInactive',onPageChange:function(page)
    3131{if(options.onPageChange!=null&&jQuery.isFunction(options.onPageChange))
    32 {options.onPageChange(requestNumber,page,options.numberPerPage);}},});requestNumber=options.requestResultRequestNumber;},fillCaddie=function(mode,requestNumber)
     32{options.onPageChange(requestNumber,page,options.numberPerPage);}}});requestNumber=options.requestResultRequestNumber;},fillCaddie=function(mode,requestNumber)
    3333{$('#iMenuCaddieImg').css('display','inline-block');$('#iMenuCaddieItems ul').css('display','none');$.ajax({type:"POST",url:"plugins/GrumPluginClasses/gpc_ajax.php",async:true,data:{ajaxfct:"admin.rbuilder.fillCaddie",fillMode:mode,requestNumber:requestNumber},success:function(msg)
    3434{$('#iMenuCaddieImg').css('display','none');$('#iMenuCaddieItems ul').css('display','block');alert(requestBuilderOptions.textCaddieUpdated);},error:function(msg)
    35 {$('#iMenuCaddieImg').css('display','none');$('#iMenuCaddieItems ul').css('display','block');alert(requestBuilderOptions.textSomethingWrong);},});};init(optionsToSet);};function init()
    36 {im=new interfaceManager({requestCriterionsVisible:'cRequestCriterions',requestCriterionsHidden:'cModifyRequest',requestResult:'cResultQuery',requestResultContent:'iResultQueryContent',requestResultNfo:'iResultQueryNfo',requestResultPagesNavigator:'iPagesNavigator',});requestBuilderOptions.classGroup='gcBorderInput gcTextInput';requestBuilderOptions.classItem='gcBgInput gcTextInput';requestBuilderOptions.classOperator='cbOperator cbOperatorBg gcLinkHover';requestBuilderOptions.onRequestSuccess=function(msg){im.doAction('queryResult',true,msg);cb.doAction('getPage',im.getRequestNumber(),1,im.getNumberPerPage());};requestBuilderOptions.onRequestError=function(msg){im.doAction('queryResult',false,msg);};requestBuilderOptions.onGetPageSuccess=function(msg){im.doAction('queryPage',true,msg);};requestBuilderOptions.onGetPageError=function(msg){im.doAction('queryPage',false,msg);};cb=new criteriaBuilder('iListSelectedCriterions',requestBuilderOptions);im.doAction('setOptions',{onPageChange:function(requestNumber,page,numberPerPage)
     35{$('#iMenuCaddieImg').css('display','none');$('#iMenuCaddieItems ul').css('display','block');alert(requestBuilderOptions.textSomethingWrong);}});};init(optionsToSet);};function init()
     36{im=new interfaceManager({requestCriterionsVisible:'cRequestCriterions',requestCriterionsHidden:'cModifyRequest',requestResult:'cResultQuery',requestResultContent:'iResultQueryContent',requestResultNfo:'iResultQueryNfo',requestResultPagesNavigator:'iPagesNavigator'});requestBuilderOptions.classGroup='gcBorderInput gcTextInput';requestBuilderOptions.classItem='gcBgInput gcTextInput';requestBuilderOptions.classOperator='cbOperator cbOperatorBg gcLinkHover';requestBuilderOptions.onRequestSuccess=function(msg){im.doAction('queryResult',true,msg);cb.doAction('getPage',im.getRequestNumber(),1,im.getNumberPerPage());};requestBuilderOptions.onRequestError=function(msg){im.doAction('queryResult',false,msg);};requestBuilderOptions.onGetPageSuccess=function(msg){im.doAction('queryPage',true,msg);};requestBuilderOptions.onGetPageError=function(msg){im.doAction('queryPage',false,msg);};cb=new criteriaBuilder('iListSelectedCriterions',requestBuilderOptions);im.doAction('setOptions',{onPageChange:function(requestNumber,page,numberPerPage)
    3737{$('#iResultQueryContent').html("<br><img class='waitingResult' src='./plugins/GrumPluginClasses/icons/processing.gif'>");cb.doAction('getPage',requestNumber,page,numberPerPage);}});}
  • extensions/GrumPluginClasses/main.inc.php

    r10246 r10884  
    22/*
    33Plugin Name: Grum Plugins Classes.3
    4 Version: 3.5.0
     4Version: 3.5.1
    55Description: Collection de classes partagées entre mes plugins (existants, ou à venir) / Partaged classes between my plugins (actuals or futures)
    66Plugin URI: http://piwigo.org/ext/extension_view.php?eid=199
     
    157157|         |            | * add language pt_PT (thanks to translator)
    158158|         |            |
    159 | 3.5.0   | 2011/04/10 | * mantis bug:2149
    160 |         |            |
    161 |         |            |
    162 |         |            |
    163 |         |            |
    164 |         |            |
     159| 3.5.0   | 2011/04/10 | * mantis bug:2149
    165160|         |            |   . Compatibility with piwigo 2.2
     161|         |            |
     162| 3.5.1   | 2011/05/15 | * mantis bug:2302
     163|         |            |   . Request builder interface don't work
     164|         |            |
     165|         |            |
     166|         |            |
     167|         |            |
    166168|         |            |
    167169|         |            | ===== Don't forget to update the plugin version ! =====
Note: See TracChangeset for help on using the changeset viewer.