Ignore:
Timestamp:
Sep 4, 2012, 3:15:26 PM (12 years ago)
Author:
grum
Message:

version 3.5.4 - fix minor bug & add new functions to framework

Location:
extensions/GrumPluginClasses
Files:
39 added
19 edited

Legend:

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

    r17562 r17735  
    33/* -----------------------------------------------------------------------------
    44  class name     : GPCCore
    5   class version  : 1.4.2
    6   plugin version : 3.5.3
     5  class version  : 1.4.3
     6  plugin version : 3.5.4
    77  date           : 2012-07-27
    88  ------------------------------------------------------------------------------
     
    7474|         |            |
    7575| 1.4.2   | 2012/07/27 | * AddHeaderContent can manage 'raw' content
     76|         |            |
     77| 1.4.3   | 2012/08/29 | * Add js objects: inputTreeList + inputExportBox + download
     78|         |            |
     79|         |            | * Update js objects: inputText (bug fix)
     80|         |            |
     81|         |            | * Add urlBuild function
    7682|         |            |
    7783|         |            |
     
    102108    - static function setTemplateToken
    103109    - static function addHeaderContent
     110    - static function urlBuild
    104111   ---------------------------------------------------------------------- */
    105112
     
    144151        Array('name' => "GPCAjax", 'version' => "3.1.0"),
    145152        Array('name' => "GPCCategorySelector", 'version' => "1.0.1"),
    146         Array('name' => "GPCCore", 'version' => "1.4.2"),
     153        Array('name' => "GPCCompress", 'version' => "1.4.0"),
     154        Array('name' => "GPCCore", 'version' => "1.4.3"),
    147155        //Array('name' => "GPCCss", 'version' => "3.1.0"),  removed with v1.4.1
     156        Array('name' => "GPCExport", 'version' => "1.0.0"),
    148157        Array('name' => "GPCPagesNavigation", 'version' => "2.0.0"),
    149158        Array('name' => "GPCPublicIntegration", 'version' => "2.0.0"),
     
    151160        Array('name' => "GPCTables", 'version' => "1.5.0"),
    152161        Array('name' => "GPCTabSheet", 'version' => "1.1.2"),
    153         Array('name' => "GPCTranslate", 'version' => "2.1.1"),
    154         Array('name' => "GPCUsersGroups", 'version' => "2.1.0"),
    155         Array('name' => "GPCUserAgent", 'version' => "1.0.0")
     162        //Array('name' => "GPCTranslate", 'version' => "2.1.1"), doesn't exist anymore
     163        Array('name' => "GPCUserAgent", 'version' => "1.0.1"),
     164        Array('name' => "GPCUsersGroups", 'version' => "2.1.0")
    156165      )
    157166    );
     
    669678          break;
    670679        case 'canvasDraw.graph':
     680          self::addHeaderCSS('gpc.canvasDraw', GPC_PATH.'css/canvasDraw.css');
    671681          self::addHeaderCSS('gpc.canvasDrawT', sprintf($themeFile, 'canvasDraw'));
    672682          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     
    746756          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
    747757          self::addHeaderJS('gpc.inputDotArea', GPC_PATH.'js/ui.inputDotArea.js', array('jquery.ui.widget'));
     758          break;
     759        case 'inputExportBox':
     760          self::addHeaderCSS('gpc.inputText', GPC_PATH.'css/inputText.css');
     761          self::addHeaderCSS('gpc.inputTextT', sprintf($themeFile, 'inputText'));
     762          self::addHeaderCSS('gpc.inputList', GPC_PATH.'css/inputList.css');
     763          self::addHeaderCSS('gpc.inputListT', sprintf($themeFile, 'inputList'));
     764          self::addHeaderCSS('gpc.inputExportBox', GPC_PATH.'css/inputExportBox.css');
     765          self::addHeaderCSS('gpc.inputExportBoxT', sprintf($themeFile, 'inputExportBox'));
     766
     767          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     768          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     769
     770          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     771          self::addHeaderJS('jquery.ui.mouse', 'themes/default/js/ui/jquery.ui.mouse.js', array('jquery.ui.widget'));
     772          self::addHeaderJS('jquery.ui.position', 'themes/default/js/ui/jquery.ui.position.js', array('jquery.ui.mouse'));
     773          self::addHeaderJS('jquery.ui.resizable', 'themes/default/js/ui/jquery.ui.resizable.js', array('jquery.ui.position'));
     774          self::addHeaderJS('jquery.ui.draggable', 'themes/default/js/ui/jquery.ui.draggable.js', array('jquery.ui.resizable'));
     775          self::addHeaderJS('jquery.ui.sortable', 'themes/default/js/ui/jquery.ui.sortable.js', array('jquery.ui.draggable'));
     776          self::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/jquery.ui.dialog.js', array('jquery.ui.sortable'));
     777
     778          self::addHeaderJS('gpc.inputText', GPC_PATH.'js/ui.inputText.js', array('jquery.ui.dialog'));
     779          self::addHeaderJS('gpc.inputList', GPC_PATH.'js/ui.inputList.js', array('jquery.ui.dialog'));
     780          self::addHeaderJS('gpc.inputExportBox', GPC_PATH.'js/ui.inputExportBox.js', array('jquery.ui.dialog'));
    748781          break;
    749782        case 'inputFilterBox':
     
    802835          self::addHeaderJS('gpc.inputPages', GPC_PATH.'js/ui.inputPages.js', array('jquery','jquery.ui.widget'));
    803836          break;
     837        case 'inputPath':
     838          self::addHeaderCSS('gpc.inputPath', GPC_PATH.'css/inputPath.css');
     839          self::addHeaderCSS('gpc.inputPathT', sprintf($themeFile, 'inputPath'));
     840          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     841          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     842          self::addHeaderJS('gpc.inputPath', GPC_PATH.'js/ui.inputPath.js', array('jquery','jquery.ui.widget'));
     843          break;
    804844        case 'inputPosition':
    805845          self::addHeaderCSS('gpc.inputPosition', GPC_PATH.'css/inputPosition.css');
     
    854894          self::addHeaderJS('gpc.inputText', GPC_PATH.'js/ui.inputText.js', array('jquery.ui.widget'));
    855895          break;
     896        case 'inputTreeList':
     897          self::addHeaderCSS('gpc.inputTreeList', GPC_PATH.'css/inputTreeList.css');
     898          self::addHeaderCSS('gpc.inputTreeListT', sprintf($themeFile, 'inputTreeList'));
     899          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     900          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     901          self::addHeaderJS('gpc.inputTreeList', GPC_PATH.'js/ui.inputTreeList.js', array('jquery.ui.widget'));
     902          break;
    856903        case 'simpleTip':
    857904          self::addHeaderCSS('gpc.simpleTip', GPC_PATH.'css/simpleTip.css');
     
    860907          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
    861908          self::addHeaderJS('gpc.simpleTip', GPC_PATH.'js/simpleTip.js', array('jquery.ui.widget'));
     909          break;
     910        case 'download':
     911          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     912          self::addHeaderJS('gpc.download', GPC_PATH.'js/ui.download.js', array('jquery'));
    862913          break;
    863914        case 'dynamicTable':
     
    918969      }
    919970    }
     971  }
     972
     973
     974  /**
     975   * build an url from given properties
     976   *
     977   * @param String $urlType: type of url to build
     978   * @param Array $properties: properties used to build url
     979   * @return String: url, or empty string if not possible to build it
     980   */
     981  static public function urlBuild($type, $properties=array())
     982  {
     983    $returned='';
     984    switch($type)
     985    {
     986      case 'admin.picture':
     987        if(isset($properties['pictureId']))
     988        {
     989          $returned='./admin.php?page=photo-'.$properties['pictureId'];
     990        }
     991        break;
     992      case 'admin.category':
     993      case 'admin.album':
     994        if(isset($properties['categoryId']))
     995        {
     996          $returned='./admin.php?page=album-'.$properties['categoryId'];
     997        }
     998        break;
     999    }
     1000    return($returned);
    9201001  }
    9211002
  • extensions/GrumPluginClasses/classes/GPCUserAgent.class.inc.php

    r17562 r17735  
    11<?php
     2/* -----------------------------------------------------------------------------
     3  class name: GPCUserAgent
     4  class version  : 1.0.1
     5  plugin version : 3.5.4
     6  date           : 2012-09-04
     7  ------------------------------------------------------------------------------
     8  author: grum at piwog.org
     9  << May the Little SpaceFrog be with you >>
     10  ------------------------------------------------------------------------------
     11
     12
     13| release | date       |
     14| 1.0.1   | 2012/09/04 | * Fix some bot definition
     15|         |            |
     16|         |            |
     17
     18   ---------------------------------------------------------------------- */
    219
    320require_once('GPCUserAgent.const.inc.php');
  • extensions/GrumPluginClasses/classes/GPCUserAgent.const.inc.php

    r17562 r17735  
    263263              UA_BOT_EXALEAD           => array(UA_PROP_NAME => 'Exalead',              UA_PROP_TYPE=>UA_BROWSER_TYPE_CRAWLER, UA_PROP_URL => ''),
    264264              UA_BOT_GAMESPY           => array(UA_PROP_NAME => 'GameSpy',              UA_PROP_TYPE=>UA_BROWSER_TYPE_CRAWLER, UA_PROP_URL => ''),
     265              UA_BOT_GIGABLAST         => array(UA_PROP_NAME => 'Gigabot',              UA_PROP_TYPE=>UA_BROWSER_TYPE_CRAWLER, UA_PROP_URL => 'http://www.gigablast.com/spider.html'),
    265266              UA_BOT_INKTOMI           => array(UA_PROP_NAME => 'Inktomi',              UA_PROP_TYPE=>UA_BROWSER_TYPE_CRAWLER, UA_PROP_URL => ''),
    266267              UA_BOT_YAHOO_SEARCH      => array(UA_PROP_NAME => 'Yahoo! Search',        UA_PROP_TYPE=>UA_BROWSER_TYPE_CRAWLER, UA_PROP_URL => 'http://www.yahoo.com/'),
  • extensions/GrumPluginClasses/css/canvasDraw_roma.css

    r17562 r17735  
    1 /* dialog resizeable borders */
    2 div.cd-mainWindow .ui-resizable-n, div.cd-mainWindow .ui-resizable-s {
    3   height:0px;
    4 }
    5 div.cd-mainWindow .ui-resizable-w, div.cd-mainWindow .ui-resizable-e {
    6   width:0px;
    7 }
    8 div.ui-resizable-se {
    9   width:14px;
    10   height:14px;
    11   display:block;
    12 }
    13 
    14 /* content */
    15 div.cd-mainWindow div.ui-dialog-content,
    16 div.cd-boxWindow div.ui-dialog-content {
    17   overflow:hidden;
    18 }
    19 
    20 /* dialog title */
    21 div.cd-mainWindow div.ui-dialog-titlebar,
    22 div.cd-boxWindow div.ui-dialog-titlebar {
    23   cursor:move;
    24 }
    25 div.cd-mainWindow div.ui-dialog-titlebar {
    26   height:19px;
    27 }
    28 
    29 div.cd-mainWindow-titleBar-title {
    30   display:inline-block;
    31   padding:1x;
    32 }
    33 div.cd-mainWindow-titleBar-buttonsBar {
    34   display:inline-block;
    35   float:left;
    36 }
    37 div.cd-mainWindow a.ui-dialog-titlebar-close,
    38 div.cd-boxWindow a.ui-dialog-titlebar-close {
    39   display:inline-block;
    40   padding:3px 7px 4px 8px;
    41   outline:none;
    42 }
    43 div.cd-mainWindow a.ui-dialog-titlebar-close {
    44   padding:0 7px 3px 8px;
    45 }
    46 div.cd-boxWindow a.ui-dialog-titlebar-close {
    47   margin: -2px 2px 0 0;
    48   padding: 0;
    49 }
    50 div.cd-mainWindow a.ui-dialog-titlebar-close:hover,
    51 div.cd-boxWindow a.ui-dialog-titlebar-close:hover {
    52   border:none;
    53   outline:none;
    54 }
    55 
    56 /* console */
    57 div.cd-mainWindow-console div.ui-inputConsole {
    58   border-left:0px;
    59   border-right:0px
    60 }
    61 
    62 /* status bar */
    63 div.cd-mainWindow-statusBar table.ui-inputStatusBar {
    64   border:none;
    65   font-size:80%;
    66 }
    67 div.cd-mainWindow-statusBar table.ui-inputStatusBar td {
    68   padding:1px;
    69 }
    70 #cd-mainWindow-sb-nfoHelp {
    71   border-right:none;
    72   text-align: left;
    73 }
    74 #cd-mainWindow-sb-nfoKeyCTRL, #cd-mainWindow-sb-nfoKeyALT {
    75   border:none;
    76 }
    77 #cd-mainWindow-sb-nfoKeySHIFT, #cd-mainWindow-sb-nfoKeyALT, #cd-mainWindow-sb-nfoKeyCTRL {
    78   text-align:center;
    79 }
    80 #cd-mainWindow-sb-nfoZoom {
    81   text-align:center;
    82 }
    83 #cd-mainWindow-sb-nfoSize, #cd-mainWindow-sb-nfoPosition {
    84   text-align:right;
    85   padding-right:3px;
    86 }
    87 
    88 
    89 div#iBtToolsSelect,
    90 div#iBtToolsZoom,
    91 div#iBtToolsLines,
    92 div#iBtToolsTexts,
    93 div#iBtToolsShapes,
    94 div#iBtToolsArrows,
    95 div#iBtToolsImages {
    96   width:22px;
    97   height:22px;
    98   margin:0;
    99   padding:0;
    100   float:left;
    101 }
    102 
    103 div#iBtToolsSelect {
    104   background-position:0 0;
    105 }
    106 div#iBtToolsSelect:hover {
    107   background-position:0 -24px;
    108 }
    109 div#iBtToolsZoom {
    110   background-position:-24px 0;
    111 }
    112 div#iBtToolsZoom:hover {
    113   background-position:-24px -24px;
    114 }
    115 div#iBtToolsLines {
    116   background-position:-48px 0;
    117 }
    118 div#iBtToolsLines:hover {
    119   background-position:-48px -24px;
    120 }
    121 div#iBtToolsTexts {
    122   background-position:-70px 0;
    123 }
    124 div#iBtToolsTexts:hover {
    125   background-position:-70px -24px;
    126 }
    127 div#iBtToolsShapes {
    128   background-position:-94px 0;
    129 }
    130 div#iBtToolsShapes:hover {
    131   background-position:-94px -24px;
    132 }
    133 div#iBtToolsArrows {
    134   background-position:-118px 0;
    135 }
    136 div#iBtToolsArrows:hover {
    137   background-position:-118px -24px;
    138 }
    139 div#iBtToolsImages {
    140   background-position:-142px 0;
    141 }
    142 div#iBtToolsImages:hover {
    143   background-position:-142px -24px;
    144 }
    145 
    146 /* drawing area */
    147 div.ui-drawingArea {
    148   width:100%;
    149   height:100%;
    150   overflow:hidden;
    151 }
    152 table.ui-drawingArea-container {
    153   width:100%;
    154   height:100%;
    155   border-collapse: collapse;
    156   display:block;
    157 }
    158 div.ui-drawingArea-viewport {
    159   position:absolute;
    160   overflow:hidden;
    161   width:100%;
    162   height:100%;
    163 }
    164 div.ui-drawingArea-sheet {
    165   width:100%;
    166   height:100%;
    167   position:relative;
    168 }
    169 canvas.ui-drawingArea-grid,
    170 canvas.ui-drawingArea-cursor,
    171 canvas.ui-drawingArea-prev,
    172 canvas.ui-drawingArea-current,
    173 canvas.ui-drawingArea-next {
    174   position:absolute;
    175   display:block;
    176 }
    177 canvas.ui-drawingArea-grid { z-index: 160; opacity:0.5; filter:alpha(opacity=50); }
    178 canvas.ui-drawingArea-cursor  { z-index: 150; opacity:0.5; filter:alpha(opacity=50); }
    179 canvas.ui-drawingArea-prev { z-index: 120; }
    180 canvas.ui-drawingArea-current  { z-index: 110; }
    181 canvas.ui-drawingArea-next  { z-index: 100; }
    182 
    183 div.ui-drawingArea-sliderH {
    184   position:absolute;
    185   height:14px;
    186 }
    187 div.ui-drawingArea-sliderV {
    188   position:absolute;
    189   width:14px;
    190 }
    191 div.ui-drawingArea div.ui-slider {
    192   cursor:pointer;
    193 }
    194 
    195 div.ui-drawingArea div.ui-slider-horizontal {
    196   height:13px;
    197   margin:0px;
    198 }
    199 div.ui-drawingArea div.ui-slider-vertical {
    200   width:13px;
    201   margin:0px;
    202 }
    203 
    204 div.ui-drawingArea a.ui-slider-handle {
    205   border-style:solid;
    206   border-width:1px;
    207   display:inline-block;
    208   height:10px;
    209   margin-top:1px;
    210   outline:medium none;
    211   position:absolute;
    212   width:10px;
    213 }
    214 
    215 
    216 
    217 /* drawing graph */
    218 div.ui-drawingGraph {
    219   overflow:hidden;
    220 }
    221 div.ui-drawingGraph-viewport {
    222   position:absolute;
    223   overflow:hidden;
    224 }
    225 div.ui-drawingGraph-sheet {
    226   position:relative;
    227 }
    228 canvas.ui-drawingGraph-cursor,
    229 canvas.ui-drawingGraph-axis,
    230 canvas.ui-drawingGraph-graph {
    231   position:absolute;
    232   display:block;
    233 }
    234 canvas.ui-drawingGraph-cursor  { z-index: 120; }
    235 canvas.ui-drawingGraph-axis { z-index: 130; }
    236 canvas.ui-drawingGraph-graph { z-index: 110; }
    237 
    238 
    2391/* --------------------------- roma --------------------------- */
    2402
  • extensions/GrumPluginClasses/css/dynamicTable.css

    r17562 r17735  
    4343div.ui-dynamicTableFilterButton-inactive,
    4444div.ui-dynamicTableFilterButton-active,
    45 div.ui-dynamicTableSortButton {
     45div.ui-dynamicTableSortButton,
     46div.ui-dynamicTableGroupButton-inactive,
     47div.ui-dynamicTableGroupButton-active,
     48div.ui-dynamicTableFooter-saveButton {
    4649  float:right;
    4750  width:14px;
     
    5154  padding: 0px;
    5255}
     56
    5357
    5458div.ui-dynamicTableLoading {
     
    7579div.ui-dynamicTableFooter-nbItems {
    7680  display:inline-block;
     81  margin-top: 2px;
    7782}
    7883div.ui-dynamicTableFooter-pagesNavigator {
     
    8085  float:right;
    8186}
     87div.ui-dynamicTableFooter-saveButton {
     88  display:inline-block;
     89  float:left;
     90  margin-right:4px;
     91}
     92div.ui-dynamicTableFooter-saveButtonWait {
     93  display:inline-block;
     94  float:left;
     95  margin-right:4px;
     96  background:url(./../icons/processing.gif) no-repeat scroll 0 0 transparent;
     97  width:16px;
     98  height:16px;
     99}
  • extensions/GrumPluginClasses/css/dynamicTable_clear.css

    r17562 r17735  
    3232div.ui-dynamicTableFilterButton-inactive,
    3333div.ui-dynamicTableFilterButton-active,
    34 div.ui-dynamicTableSortButton {
     34div.ui-dynamicTableSortButton,
     35div.ui-dynamicTableGroupButton-inactive,
     36div.ui-dynamicTableGroupButton-active {
    3537  background-image:url(./../icons/buttons.png);
    3638  background-repeat:no-repeat;
     
    4345div.ui-dynamicTableFilterButton-inactive:hover,
    4446div.ui-dynamicTableFilterButton-active:hover,
    45 div.ui-dynamicTableSortButton:hover {
     47div.ui-dynamicTableSortButton:hover,
     48div.ui-dynamicTableGroupButton-inactive:hover,
     49div.ui-dynamicTableGroupButton-active:hover {
    4650  background-color:#999999;
    4751}
     
    6872}
    6973
     74div.ui-dynamicTableGroupButton-active {
     75  background-position:-360px -90px;
     76}
     77div.ui-dynamicTableGroupButton-active:hover {
     78  background-position:-360px -105px;
     79}
     80div.ui-dynamicTableGroupButton-inactive {
     81  background-position:-345px -90px;
     82}
     83div.ui-dynamicTableGroupButton-inactive:hover {
     84  background-position:-345px -105px;
     85}
  • extensions/GrumPluginClasses/css/dynamicTable_roma.css

    r17562 r17735  
    1616thead.ui-dynamicTableHeader {
    1717  background:#333333;
    18   color:#FF7700;
     18  color:#FF3366;
    1919  font-weight:bold;
    2020}
     
    3232div.ui-dynamicTableFilterButton-inactive,
    3333div.ui-dynamicTableFilterButton-active,
    34 div.ui-dynamicTableSortButton {
     34div.ui-dynamicTableSortButton,
     35div.ui-dynamicTableGroupButton-inactive,
     36div.ui-dynamicTableGroupButton-active,
     37div.ui-dynamicTableFooter-saveButton {
    3538  background-image:url(./../icons/buttons.png);
    3639  background-repeat:no-repeat;
     
    4346div.ui-dynamicTableFilterButton-inactive:hover,
    4447div.ui-dynamicTableFilterButton-active:hover,
    45 div.ui-dynamicTableSortButton:hover {
     48div.ui-dynamicTableSortButton:hover,
     49div.ui-dynamicTableGroupButton-inactive:hover ,
     50div.ui-dynamicTableGroupButton-active:hover,
     51div.ui-dynamicTableFooter-saveButton:hover {
    4652  background-color:#222222;
    4753}
     
    6874}
    6975
     76div.ui-dynamicTableGroupButton-active {
     77  background-position:-360px -15px;
     78}
     79div.ui-dynamicTableGroupButton-active:hover {
     80  background-position:-360px 0px;
     81}
     82div.ui-dynamicTableGroupButton-inactive {
     83  background-position:-345px -15px;
     84}
     85div.ui-dynamicTableGroupButton-inactive:hover {
     86  background-position:-345px 0px;
     87}
     88
     89div.ui-dynamicTableFooter-saveButton {
     90  background-position:-375px -15px;
     91}
     92div.ui-dynamicTableFooter-saveButton:hover {
     93  background-position:-375px 0px;
     94}
  • extensions/GrumPluginClasses/gpc_version.inc.php

    r17562 r17735  
    1515  if(!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    1616
    17   if(!defined('GPC_VERSION')) define('GPC_VERSION',  '3.5.3');
    18   if(!defined('GPC_VERSION2')) define('GPC_VERSION2', '03.05.03');
     17  if(!defined('GPC_VERSION')) define('GPC_VERSION',  '3.5.4');
     18  if(!defined('GPC_VERSION2')) define('GPC_VERSION2', '03.05.04');
    1919?>
  • extensions/GrumPluginClasses/js/CanvasDraw.GraphClasses.js

    r17562 r17735  
    335335            if(value.display.visible.XY.cursorV==true || value.display.visible.XY.cursorV==false) properties.display.visible.XY.cursorV=value.display.visible.XY.cursorV;
    336336          }
     337          if(value.display.visible.pie!=null)
     338          {
     339            if(value.display.visible.pie==true || value.display.visible.pie==false) properties.display.visible.pie=value.display.visible.pie;
     340          }
     341
    337342        }
    338343      }
     
    847852      if(!$.isPlainObject(values)) return(false);
    848853
    849       if(values.backgroundColor!=null && $.isArray(values.backgroundColors)) properties.backgroundColors=values.backgroundColors;
     854      if(values.backgroundColors!=null && $.isArray(values.backgroundColors)) properties.backgroundColors=values.backgroundColors;
    850855      if(values.borderColor!=null) properties.borderColor=values.borderColor;
    851856      if(values.borderWidth!=null && values.borderWidth>=0) properties.borderWidth=values.borderWidth;
  • extensions/GrumPluginClasses/js/ui.categorySelector.js

    r16012 r17735  
    11621162
    11631163          }
    1164           return(options.userMode);
     1164          return(options.displayPath);
    11651165        }, //setDisplayPath
    11661166
     
    15711571                        }
    15721572                       ).bind('click.categorySelector',
    1573                           {object:object, value:$(this).parent().parent().attr('catid')},
     1573                          {object:object, value:$(this).parent().parent().attr('catId')},
    15741574                          function (event)
    15751575                          {
  • extensions/GrumPluginClasses/js/ui.dynamicTable.js

    r17562 r17735  
    22 * -----------------------------------------------------------------------------
    33 * file: ui.dynamicTable.js
    4  * file version: 1.0.0
    5  * date: 2012-06-09
     4 * file version: 1.0.1
     5 * date: 2012-09-01
    66 *
    77 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses"
     
    2222 *
    2323 * | release | date       |
    24  * | 1.0.0   | 2012/06/09 | first release
     24 * | 1.0.0   | 2012/06/09 | * first release
    2525 * |         |            |
     26 * | 1.0.1   | 2012/09/01 |  * fix bugs
     27 * |         |            |
     28 * |         |            |  * add 'group' icon
     29 * |         |            |
     30 * |         |            |  * add 'save' button
    2631 * |         |            |
    2732 * |         |            |
     
    6267                      contentLoading:null,
    6368                      contentLoaded:null,
     69                      contentDisplayed:null,
    6470                      pageChanged:null,
     71                      click:null,
     72                      saveButtonClick:null,
    6573                      nbItemsPage:50,
    6674                      currentPage:1,
    6775                      sortBoxTitle:'Sort by',
    6876                      showTotalRow:'auto',     // visible, hidden, auto
     77                      showSaveButton:false,
    6978                      footerString:
    7079                        {
    7180                          singular:'% item',
    72                           plural:'% items'
     81                          plural:'% items',
     82                          waitForDownload:'Please wait, download will start...'
    7383                        },
    7484                      pagesNavigator:{},
     
    95105                    sortedColumns:[],
    96106                    filteredColumns:[],
     107                    groupedColumns:[],
    97108                    loadedData:[],
    98                     totalRowHasData:false
     109                    totalRowHasData:false,
     110                    downloadWaitState:false
    99111                  }
    100112                );
     
    153165                        }
    154166                      ),
     167                    footerSaveButton:$('<div/>',
     168                        {
     169                          'class':'ui-dynamicTableFooter-saveButton'
     170                        }
     171                      ),
    155172                    footerNbItems:$('<div/>',
    156173                        {
     
    174191                  .append(objects.totalRowContent.append(objects.totalRowTr))
    175192                  .append(objects.footer
     193                            .append(objects.footerSaveButton)
    176194                            .append(objects.footerNbItems)
    177195                            .append(objects.footerPagesNavigator)
     
    303321        }, // footerString
    304322
     323      waitForDownload: function (value)
     324        {
     325          if(value!=null)
     326          {
     327            // set selected value
     328            return(
     329              this.each(
     330                function()
     331                {
     332                  privateMethods.setDownloadWaitState($(this), value);
     333                }
     334              )
     335            );
     336          }
     337          else
     338          {
     339            var properties=this.data('properties');
     340            return(properties.downloadWaitState);
     341          }
     342        }, // waitForDownload
     343
    305344      autoLoad: function (value)
    306345        {
     
    347386
    348387
     388
     389      showSaveButton : function (value)
     390        {
     391          if(value!=null)
     392          {
     393            // set selected value
     394            return(
     395              this.each(
     396                function()
     397                {
     398                  privateMethods.setShowSaveButton($(this), value);
     399                }
     400              )
     401            );
     402          }
     403          else
     404          {
     405            var options=this.data('options');
     406            return(options.showSaveButton);
     407          }
     408        }, // showSaveButton
     409
     410
    349411       currentPage: function (value)
    350412        {
     
    473535        }, // maxHeight
    474536
     537      click: function (value)
     538        {
     539          if(value!=null && ($.isFunction(value) || value=='clear'))
     540          {
     541            // set selected value
     542            return(
     543              this.each(
     544                function()
     545                {
     546                  privateMethods.setEventClick($(this), value);
     547                }
     548              )
     549            );
     550          }
     551          else
     552          {
     553            // return the selected value
     554            var options=this.data('options');
     555
     556            if(options)
     557            {
     558              return(options.click);
     559            }
     560            else
     561            {
     562              return(null);
     563            }
     564          }
     565        }, // click
     566
     567
     568      saveButtonClick: function (value)
     569        {
     570          if(value!=null && ($.isFunction(value) || value=='clear'))
     571          {
     572            // set selected value
     573            return(
     574              this.each(
     575                function()
     576                {
     577                  privateMethods.setEventSaveButtonClick($(this), value);
     578                }
     579              )
     580            );
     581          }
     582          else
     583          {
     584            // return the selected value
     585            var options=this.data('options');
     586
     587            if(options)
     588            {
     589              return(options.saveButtonClick);
     590            }
     591            else
     592            {
     593              return(null);
     594            }
     595          }
     596        }, // saveButtonClick
     597
    475598      contentLoading: function (value)
    476599        {
    477           if(value!=null && $.isFunction(value))
     600          if(value!=null && ($.isFunction(value) || value=='clear'))
    478601          {
    479602            // set selected value
     
    505628      contentLoaded: function (value)
    506629        {
    507           if(value!=null && $.isFunction(value))
     630          if(value!=null && ($.isFunction(value) || value=='clear'))
    508631          {
    509632            // set selected value
     
    533656        }, // contentLoaded
    534657
     658      contentDisplayed: function (value)
     659        {
     660          if(value!=null && ($.isFunction(value) || value=='clear'))
     661          {
     662            // set selected value
     663            return(
     664              this.each(
     665                function()
     666                {
     667                  privateMethods.setEventContentDisplayed($(this), value);
     668                }
     669              )
     670            );
     671          }
     672          else
     673          {
     674            // return the selected value
     675            var options=this.data('options');
     676
     677            if(options)
     678            {
     679              return(options.contentDisplayed);
     680            }
     681            else
     682            {
     683              return(null);
     684            }
     685          }
     686        }, // contentDisplayed
     687
    535688      pageChanged: function (value)
    536689        {
    537           if(value!=null && $.isFunction(value))
     690          if(value!=null && ($.isFunction(value) || value=='clear'))
    538691          {
    539692            // set selected value
     
    610763          privateMethods.setAutoLoad(object, (value.autoLoad!=null)?value.autoLoad:options.autoLoad);
    611764          privateMethods.setShowTotalRow(object, (value.showTotalRow!=null)?value.showTotalRow:options.showTotalRow);
     765          privateMethods.setShowSaveButton(object, (value.showSaveButton!=null)?value.showSaveButton:options.showSaveButton);
    612766          privateMethods.setPostData(object, (value.postData!=null)?value.postData:options.postData);
    613767          privateMethods.setPostUrl(object, (value.postUrl!=null)?value.postUrl:options.postUrl);
     
    624778          privateMethods.setEventContentLoading(object, (value.contentLoading!=null)?value.contentLoading:options.contentLoading);
    625779          privateMethods.setEventContentLoaded(object, (value.contentLoaded!=null)?value.contentLoaded:options.contentLoaded);
     780          privateMethods.setEventContentDisplayed(object, (value.contentDisplayed!=null)?value.contentDisplayed:options.contentDisplayed);
    626781          privateMethods.setEventPageChanged(object, (value.pageChanged!=null)?value.pageChanged:options.pageChanged);
     782          privateMethods.setEventSaveButtonClick(object, (value.saveButtonClick!=null)?value.saveButtonClick:options.saveButtonClick);
    627783          privateMethods.setEventClick(object, (value.click!=null)?value.click:options.click);
    628784
     
    662818
    663819          return(options.showTotalRow);
    664         }, // setAutoLoad
     820        }, // setShowTotalRow
     821
     822
     823      setShowSaveButton : function (object, value)
     824        {
     825          var properties=object.data('properties'),
     826              options=object.data('options');
     827
     828          if((!properties.initialized || value!=options.showSaveButton) && (value==true || value==false))
     829          {
     830            options.showSaveButton=value;
     831            if(properties.initialized)
     832              privateMethods.showSaveButton(object);
     833          }
     834
     835          return(options.showSaveButton);
     836        }, // setShowSaveButton
    665837
    666838
     
    696868            newCol.width=(value.width!=null)?value.width:'';
    697869            newCol.sortable=(value.sortable=='asc' || value.sortable=='desc')?value.sortable:'no';
     870            newCol.group=(value.group==true||value.group==false)?value.group:false;
    698871            newCol.filter=null;
    699872
     
    767940              options.footerString.plural=value.plural;
    768941
     942            if((!properties.initialized || value.waitForDownload!=null) && value.waitForDownload!='' && value.waitForDownload!=options.footerString.waitForDownload)
     943              options.footerString.waitForDownload=value.waitForDownload;
     944
    769945            privateMethods.updateNbItems(object);
    770946          }
     
    779955        }, // setFooterString
    780956
    781       setDialogsButtons: function (object, value)
     957      setDownloadWaitState: function (object, value)
    782958        {
    783959          var options=object.data('options'),
    784960              properties=object.data('properties');
    785961
     962          if((!properties.initialized || value!=null) && (value==true || value==false) && (value!=properties.downloadWaitState))
     963          {
     964            properties.downloadWaitState=value;
     965            privateMethods.applyDownloadWaitState(object);
     966          }
     967          return(properties.downloadWaitState);
     968        }, // setDownloadWaitState
     969
     970      setDialogsButtons: function (object, value)
     971        {
     972          var options=object.data('options'),
     973              properties=object.data('properties');
     974
    786975
    787976          if($.isPlainObject(value))
     
    8321021          var options=object.data('options');
    8331022
     1023          if(value=='clear') value=null;
    8341024          options.contentLoading=value;
    8351025          object.unbind('dynamicTableContentLoading');
     
    8421032          var options=object.data('options');
    8431033
     1034          if(value=='clear') value=null;
    8441035          options.contentLoaded=value;
    8451036          object.unbind('dynamicTableContentLoaded');
     
    8481039        }, //setEventContentLoaded
    8491040
     1041      setEventContentDisplayed : function (object, value)
     1042        {
     1043          var options=object.data('options');
     1044
     1045          if(value=='clear') value=null;
     1046          options.contentDisplayed=value;
     1047          object.unbind('dynamicTableContentDisplayed');
     1048          if(value) object.bind('dynamicTableContentDisplayed', options.contentDisplayed);
     1049          return(options.contentDisplayed);
     1050        }, //setEventContentDisplayed
     1051
    8501052      setEventPageChanged : function (object, value)
    8511053        {
    8521054          var options=object.data('options');
    8531055
     1056          if(value=='clear') value=null;
    8541057          options.pageChanged=value;
    8551058          object.unbind('dynamicTablePageChanged');
     
    8631066              objects=object.data('objects');
    8641067
     1068          if(value=='clear') value=null;
    8651069          options.click=value;
    8661070          objects.content.find('tr').unbind('click.dynamicTable');
     
    8761080          return(options.click);
    8771081        }, //setEventClick
     1082
     1083
     1084      setEventSaveButtonClick : function (object, value)
     1085        {
     1086          var options=object.data('options'),
     1087              objects=object.data('objects');
     1088
     1089          if(value=='clear') value=null;
     1090          options.saveButtonClick=value;
     1091          objects.footerSaveButton.unbind('click.dynamicTable');
     1092          if(value)
     1093            objects.footerSaveButton.bind('click.dynamicTable', function (event)
     1094              {
     1095                options.saveButtonClick(event, privateMethods.getPostProperties(object));
     1096              }
     1097            );
     1098
     1099          return(options.saveButtonClick);
     1100        }, //setEventSaveButtonClick
     1101
    8781102
    8791103      setNbItems: function (object, value)
     
    9811205            if(options.columns[i].filter!=null)
    9821206            {
     1207              // filter button
    9831208              button=$('<div/>',
    9841209                        {
     
    10391264                       );
    10401265              td.append(button);
    1041             }
     1266            } // filter button
     1267
     1268
     1269            if(options.columns[i].group==true)
     1270            {
     1271              // groupable button
     1272              button=$('<div/>',
     1273                        {
     1274                          class:'ui-dynamicTableGroupButton-inactive'
     1275                        }
     1276                      )
     1277                      .bind('click', i,
     1278                         function (event)
     1279                         {
     1280                           var columnIndex=event.data,
     1281                               $button=$(this);
     1282
     1283                          $button.toggleClass('ui-dynamicTableGroupButton-inactive ui-dynamicTableGroupButton-active');
     1284
     1285                          if($button.hasClass('ui-dynamicTableGroupButton-active'))
     1286                          {
     1287                            properties.groupedColumns[columnIndex]=options.columns[columnIndex].id;
     1288                          }
     1289                          else
     1290                          {
     1291                            delete properties.groupedColumns[columnIndex];
     1292                          }
     1293
     1294                          privateMethods.setCurrentPage(object, 1);
     1295                         }
     1296                       );
     1297              td.append(button);
     1298            } // groupable button
     1299
    10421300
    10431301            objects.headerTr.append(td);
     
    11111369      loadContent : function (object, page)
    11121370        {
    1113           var data=null,
     1371          var tmpData=null,
     1372              data=null,
    11141373              tr=null,
    11151374              td=null,
     
    11271386          data.currentPage=options.currentPage;
    11281387          data.nbItemsPage=options.nbItemsPage;
    1129           data.sort=[];
    1130           for(var i=0;i<properties.sortedColumns.length;i++)
    1131           {
    1132             data.sort.push(
    1133               {
    1134                 id:properties.sortedColumns[i].id,
    1135                 direction:(properties.sortedColumns[i].direction=='asc')?'A':'D'
    1136               }
    1137             );
    1138           }
    1139           data.filter=[];
    1140           for(var i in properties.filteredColumns)
    1141           {
    1142             data.filter.push(properties.filteredColumns[i]);
    1143           }
     1388
     1389          tmpData=privateMethods.getPostProperties(object);
     1390          data.sort=tmpData.sort;
     1391          data.filter=tmpData.filter;
     1392          data.group=tmpData.group;
    11441393
    11451394          if(options.contentLoading) object.trigger('dynamicTableContentLoading', data);
     
    11781427                    for(var col=0;col<msg.rows[row].length;col++)
    11791428                    {
    1180                       td=$('<td/>').html(msg.rows[row][col]);
    1181 
    1182                       if((col==msg.rows[row].length-1) && properties.hasSortableButton) td.attr('colspan', '2');
    1183                       tr.append(td);
     1429                      if(col<options.columns.length)
     1430                      {
     1431                        td=$('<td/>').html(msg.rows[row][col]);
     1432
     1433                        if((col==msg.rows[row].length-1) && properties.hasSortableButton) td.attr('colspan', '2');
     1434                        tr.append(td);
     1435                      }
    11841436                    }
    11851437                    objects.content.append(tr);
     
    12281480                  privateMethods.showTotalRow(object);
    12291481                  privateMethods.setColumnsSize(object);
     1482
     1483                  if(options.contentDisplayed) object.trigger('dynamicTableContentDisplayed', msg);
    12301484                  privateMethods.displayLoading(object, false);
    12311485                },
     
    12391493         );
    12401494        }, //loadContent
     1495
     1496      // return a ready-to-use filter/group/sort object
     1497      getPostProperties: function (object)
     1498        {
     1499          var data={},
     1500              properties=object.data('properties');
     1501
     1502          data.sort=[];
     1503          for(var i=0;i<properties.sortedColumns.length;i++)
     1504          {
     1505            data.sort.push(
     1506              {
     1507                id:properties.sortedColumns[i].id,
     1508                direction:(properties.sortedColumns[i].direction=='asc')?'A':'D'
     1509              }
     1510            );
     1511          }
     1512          data.filter=[];
     1513          for(var i in properties.filteredColumns)
     1514          {
     1515            data.filter.push(properties.filteredColumns[i]);
     1516          }
     1517
     1518          data.group=[];
     1519          for(var i in properties.groupedColumns)
     1520          {
     1521            data.group.push(properties.groupedColumns[i]);
     1522          }
     1523          return(data);
     1524        }, //getPostProperties
    12411525
    12421526      setColumnsSize : function (object)
     
    13641648          }
    13651649
    1366         } // updateNbItems
    1367 
     1650          if(properties.nbItems>0)
     1651          {
     1652            privateMethods.showSaveButton(object);
     1653          }
     1654          else
     1655          {
     1656            privateMethods.showSaveButton(object, true); // force button hide
     1657          }
     1658
     1659        }, // updateNbItems
     1660
     1661      showSaveButton : function (object, hide)
     1662        {
     1663          var options=object.data('options'),
     1664              objects=object.data('objects');
     1665
     1666          if(hide==null) hide=false;
     1667
     1668          if(options.showSaveButton && hide!=true)
     1669          {
     1670            objects.footerSaveButton.css('display',  'block');
     1671          }
     1672          else
     1673          {
     1674            objects.footerSaveButton.css('display',  'none');
     1675          }
     1676        }, // showSaveButton
     1677
     1678      applyDownloadWaitState: function (object)
     1679        {
     1680          var options=object.data('options'),
     1681              objects=object.data('objects'),
     1682              properties=object.data('properties');
     1683
     1684          if(properties.downloadWaitState)
     1685          {
     1686            objects.footerSaveButton
     1687              .removeClass('ui-dynamicTableFooter-saveButton')
     1688              .addClass('ui-dynamicTableFooter-saveButtonWait');
     1689            objects.footerNbItems.html(options.footerString.waitForDownload);
     1690          }
     1691          else
     1692          {
     1693            objects.footerSaveButton
     1694              .removeClass('ui-dynamicTableFooter-saveButtonWait')
     1695              .addClass('ui-dynamicTableFooter-saveButton');
     1696            privateMethods.updateNbItems(object);
     1697          }
     1698        } // applyDownloadWaitState
    13681699    };
    13691700
  • extensions/GrumPluginClasses/js/ui.inputFilterBox.js

    r17562 r17735  
    3131 */
    3232
     33
    3334var inputFilterBoxLang={
    34   'Operator':'Operator',
    35   'Value':'Value',
    36   'MinValue':'Minimum value',
    37   'MaxValue':'Maximum value',
    38   '>':'Greater than',
    39   '<':'Less than',
    40   '>=':'Greater or equal to',
    41   '<=':'Less or equal to',
    42   '=':'Equal to',
    43   '!=':'Different than',
    44   'between':'Between',
    45   'and':'and',
    46   'like':'Like',
    47   'not like':'Not like',
    48   'invalidParam':'Filter is not valid'
    49 };
     35    'Operator':'Operator',
     36    'Value':'Value',
     37    'MinValue':'Minimum value',
     38    'MaxValue':'Maximum value',
     39    '>':'Greater than',
     40    '<':'Less than',
     41    '>=':'Greater or equal to',
     42    '<=':'Less or equal to',
     43    '=':'Equal to',
     44    '!=':'Different than',
     45    'between':'Between',
     46    'and':'and',
     47    'like':'Like',
     48    'not like':'Not like',
     49    'invalidParam':'Filter is not valid'
     50  };
    5051
    5152(
  • extensions/GrumPluginClasses/js/ui.inputPath.js

    r17562 r17735  
    607607          {
    608608            var item=privateMethods.getItemLevel(event.data, $(this).attr('ip-level'));
    609             event.data.trigger('inputPathClick', item);
     609
    610610            if(options.autoSetLevel)
    611611              privateMethods.setLevel(event.data, item.level);
     612
     613            event.data.trigger('inputPathClick', item);
    612614          }
    613615        }
  • extensions/GrumPluginClasses/js/ui.inputText.js

    r16012 r17735  
    22 * -----------------------------------------------------------------------------
    33 * file: ui.inputText.js
    4  * file version: 1.1.2
    5  * date: 2012-06-18
     4 * file version: 1.1.3
     5 * date: 2012-09-03
    66 *
    77 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses"
     
    3434 * |         |            | * fix bug on regExp option
    3535 * |         |            |
     36 * | 1.1.3   | 2012/09/03 | * fix bug on initial value settings & check value validity
     37 * |         |            |
    3638 * |         |            |
    3739 * |         |            |
     
    8890                    initialized:false,
    8991                    re:/.*/,
    90                     value:0,
     92                    value:'',
    9193                    isValid:true,
    9294                    languagesValues:{}
     
    601603        {
    602604          var objects=object.data('objects'),
    603               properties=object.data('properties');
     605              properties=object.data('properties'),
     606              check=false;
    604607
    605608          if(value=='check')
     609          {
    606610            value=privateMethods.isValid(object, properties.value);
    607 
    608           if(properties.isValid!=value && properties.initialized)
     611            check=true;
     612          }
     613
     614          if(properties.isValid!=value && properties.initialized || check)
    609615          {
    610616            properties.isValid=value;
  • extensions/GrumPluginClasses/language/en_UK/plugin.lang.php

    r7199 r17735  
    1515$lang['All the gallery'] = 'All the gallery';
    1616
     17
     18// gpc 3.5.4
     19$lang['filter_operator']='Operator';
     20$lang['filter_value']='Value';
     21$lang['filter_minValue']='Minimal value';
     22$lang['filter_maxValue']='Maximal value';
     23$lang['filter_gt']='Greater than';
     24$lang['filter_lt']='Less than';
     25$lang['filter_ge']='Greater or equal to';
     26$lang['filter_le']='Less or equal to';
     27$lang['filter_equal']='Equal to';
     28$lang['filter_notEqual']='Different than';
     29$lang['filter_between']='Between';
     30$lang['filter_and']='and';
     31$lang['filter_like']='Like';
     32$lang['filter_notLike']='Not like';
     33$lang['filter_invalid']='Filter is not valid';
     34
     35$lang['export_dialogTitle']='Data export';
     36$lang['export_Name']='File name';
     37$lang['export_Format']='Format';
     38$lang['export_Compression']='Compression';
     39
    1740?>
  • extensions/GrumPluginClasses/language/fr_FR/plugin.lang.php

    r12215 r17735  
    3030$lang['Your message was sent to the webmaster!']='Votre message a bien &eacute;t&eacute; transmis !';
    3131
     32// gpc 3.5.4
     33$lang['filter_operator']='Opérateur';
     34$lang['filter_value']='Valeur';
     35$lang['filter_minValue']='Valeur minimale';
     36$lang['filter_maxValue']='Valeur maximale';
     37$lang['filter_gt']='Supérieur à';
     38$lang['filter_lt']='Inférieur à';
     39$lang['filter_ge']='Supérieur ou égal à';
     40$lang['filter_le']='Inférieur ou égal à';
     41$lang['filter_equal']='Egal à';
     42$lang['filter_notEqual']='Différent de';
     43$lang['filter_between']='Entre';
     44$lang['filter_and']='et';
     45$lang['filter_like']='Ressemble à';
     46$lang['filter_notLike']='Ne ressemble pas à';
     47$lang['filter_invalid']='Le filtre n\'est pas valide';
     48
     49$lang['export_dialogTitle']='Export des données';
     50$lang['export_Name']='Nom du fichier';
     51$lang['export_Format']='Format';
     52$lang['export_Compression']='Compression';
     53
    3254?>
  • extensions/GrumPluginClasses/main.inc.php

    r17562 r17735  
    22/*
    33Plugin Name: Grum Plugins Classes.3
    4 Version: 3.5.3
     4Version: 3.5.4
    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
     
    183183|         |            |   . Error message when on page using GPC tabsheets
    184184|         |            |
     185| 3.5.4   | 2012/08/29 | * Add ui.inputTreeList object
     186|         |            |
     187|         |            | * Improve ui.dynamicTable object
     188|         |            |
     189|         |            |
     190|         |            |
     191|         |            |
    185192|         |            |
    186193|         |            |
Note: See TracChangeset for help on using the changeset viewer.