Changeset 17735
- Timestamp:
- Sep 4, 2012, 3:15:26 PM (12 years ago)
- Location:
- extensions/GrumPluginClasses
- Files:
-
- 39 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GrumPluginClasses/classes/GPCCore.class.inc.php
r17562 r17735 3 3 /* ----------------------------------------------------------------------------- 4 4 class name : GPCCore 5 class version : 1.4. 26 plugin version : 3.5. 35 class version : 1.4.3 6 plugin version : 3.5.4 7 7 date : 2012-07-27 8 8 ------------------------------------------------------------------------------ … … 74 74 | | | 75 75 | 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 76 82 | | | 77 83 | | | … … 102 108 - static function setTemplateToken 103 109 - static function addHeaderContent 110 - static function urlBuild 104 111 ---------------------------------------------------------------------- */ 105 112 … … 144 151 Array('name' => "GPCAjax", 'version' => "3.1.0"), 145 152 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"), 147 155 //Array('name' => "GPCCss", 'version' => "3.1.0"), removed with v1.4.1 156 Array('name' => "GPCExport", 'version' => "1.0.0"), 148 157 Array('name' => "GPCPagesNavigation", 'version' => "2.0.0"), 149 158 Array('name' => "GPCPublicIntegration", 'version' => "2.0.0"), … … 151 160 Array('name' => "GPCTables", 'version' => "1.5.0"), 152 161 Array('name' => "GPCTabSheet", 'version' => "1.1.2"), 153 Array('name' => "GPCTranslate", 'version' => "2.1.1"),154 Array('name' => "GPCUser sGroups", 'version' => "2.1.0"),155 Array('name' => "GPCUser Agent", '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") 156 165 ) 157 166 ); … … 669 678 break; 670 679 case 'canvasDraw.graph': 680 self::addHeaderCSS('gpc.canvasDraw', GPC_PATH.'css/canvasDraw.css'); 671 681 self::addHeaderCSS('gpc.canvasDrawT', sprintf($themeFile, 'canvasDraw')); 672 682 self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery')); … … 746 756 self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui')); 747 757 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')); 748 781 break; 749 782 case 'inputFilterBox': … … 802 835 self::addHeaderJS('gpc.inputPages', GPC_PATH.'js/ui.inputPages.js', array('jquery','jquery.ui.widget')); 803 836 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; 804 844 case 'inputPosition': 805 845 self::addHeaderCSS('gpc.inputPosition', GPC_PATH.'css/inputPosition.css'); … … 854 894 self::addHeaderJS('gpc.inputText', GPC_PATH.'js/ui.inputText.js', array('jquery.ui.widget')); 855 895 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; 856 903 case 'simpleTip': 857 904 self::addHeaderCSS('gpc.simpleTip', GPC_PATH.'css/simpleTip.css'); … … 860 907 self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui')); 861 908 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')); 862 913 break; 863 914 case 'dynamicTable': … … 918 969 } 919 970 } 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); 920 1001 } 921 1002 -
extensions/GrumPluginClasses/classes/GPCUserAgent.class.inc.php
r17562 r17735 1 1 <?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 ---------------------------------------------------------------------- */ 2 19 3 20 require_once('GPCUserAgent.const.inc.php'); -
extensions/GrumPluginClasses/classes/GPCUserAgent.const.inc.php
r17562 r17735 263 263 UA_BOT_EXALEAD => array(UA_PROP_NAME => 'Exalead', UA_PROP_TYPE=>UA_BROWSER_TYPE_CRAWLER, UA_PROP_URL => ''), 264 264 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'), 265 266 UA_BOT_INKTOMI => array(UA_PROP_NAME => 'Inktomi', UA_PROP_TYPE=>UA_BROWSER_TYPE_CRAWLER, UA_PROP_URL => ''), 266 267 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:0px60 }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 239 1 /* --------------------------- roma --------------------------- */ 240 2 -
extensions/GrumPluginClasses/css/dynamicTable.css
r17562 r17735 43 43 div.ui-dynamicTableFilterButton-inactive, 44 44 div.ui-dynamicTableFilterButton-active, 45 div.ui-dynamicTableSortButton { 45 div.ui-dynamicTableSortButton, 46 div.ui-dynamicTableGroupButton-inactive, 47 div.ui-dynamicTableGroupButton-active, 48 div.ui-dynamicTableFooter-saveButton { 46 49 float:right; 47 50 width:14px; … … 51 54 padding: 0px; 52 55 } 56 53 57 54 58 div.ui-dynamicTableLoading { … … 75 79 div.ui-dynamicTableFooter-nbItems { 76 80 display:inline-block; 81 margin-top: 2px; 77 82 } 78 83 div.ui-dynamicTableFooter-pagesNavigator { … … 80 85 float:right; 81 86 } 87 div.ui-dynamicTableFooter-saveButton { 88 display:inline-block; 89 float:left; 90 margin-right:4px; 91 } 92 div.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 32 32 div.ui-dynamicTableFilterButton-inactive, 33 33 div.ui-dynamicTableFilterButton-active, 34 div.ui-dynamicTableSortButton { 34 div.ui-dynamicTableSortButton, 35 div.ui-dynamicTableGroupButton-inactive, 36 div.ui-dynamicTableGroupButton-active { 35 37 background-image:url(./../icons/buttons.png); 36 38 background-repeat:no-repeat; … … 43 45 div.ui-dynamicTableFilterButton-inactive:hover, 44 46 div.ui-dynamicTableFilterButton-active:hover, 45 div.ui-dynamicTableSortButton:hover { 47 div.ui-dynamicTableSortButton:hover, 48 div.ui-dynamicTableGroupButton-inactive:hover, 49 div.ui-dynamicTableGroupButton-active:hover { 46 50 background-color:#999999; 47 51 } … … 68 72 } 69 73 74 div.ui-dynamicTableGroupButton-active { 75 background-position:-360px -90px; 76 } 77 div.ui-dynamicTableGroupButton-active:hover { 78 background-position:-360px -105px; 79 } 80 div.ui-dynamicTableGroupButton-inactive { 81 background-position:-345px -90px; 82 } 83 div.ui-dynamicTableGroupButton-inactive:hover { 84 background-position:-345px -105px; 85 } -
extensions/GrumPluginClasses/css/dynamicTable_roma.css
r17562 r17735 16 16 thead.ui-dynamicTableHeader { 17 17 background:#333333; 18 color:#FF 7700;18 color:#FF3366; 19 19 font-weight:bold; 20 20 } … … 32 32 div.ui-dynamicTableFilterButton-inactive, 33 33 div.ui-dynamicTableFilterButton-active, 34 div.ui-dynamicTableSortButton { 34 div.ui-dynamicTableSortButton, 35 div.ui-dynamicTableGroupButton-inactive, 36 div.ui-dynamicTableGroupButton-active, 37 div.ui-dynamicTableFooter-saveButton { 35 38 background-image:url(./../icons/buttons.png); 36 39 background-repeat:no-repeat; … … 43 46 div.ui-dynamicTableFilterButton-inactive:hover, 44 47 div.ui-dynamicTableFilterButton-active:hover, 45 div.ui-dynamicTableSortButton:hover { 48 div.ui-dynamicTableSortButton:hover, 49 div.ui-dynamicTableGroupButton-inactive:hover , 50 div.ui-dynamicTableGroupButton-active:hover, 51 div.ui-dynamicTableFooter-saveButton:hover { 46 52 background-color:#222222; 47 53 } … … 68 74 } 69 75 76 div.ui-dynamicTableGroupButton-active { 77 background-position:-360px -15px; 78 } 79 div.ui-dynamicTableGroupButton-active:hover { 80 background-position:-360px 0px; 81 } 82 div.ui-dynamicTableGroupButton-inactive { 83 background-position:-345px -15px; 84 } 85 div.ui-dynamicTableGroupButton-inactive:hover { 86 background-position:-345px 0px; 87 } 88 89 div.ui-dynamicTableFooter-saveButton { 90 background-position:-375px -15px; 91 } 92 div.ui-dynamicTableFooter-saveButton:hover { 93 background-position:-375px 0px; 94 } -
extensions/GrumPluginClasses/gpc_version.inc.php
r17562 r17735 15 15 if(!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 16 16 17 if(!defined('GPC_VERSION')) define('GPC_VERSION', '3.5. 3');18 if(!defined('GPC_VERSION2')) define('GPC_VERSION2', '03.05.0 3');17 if(!defined('GPC_VERSION')) define('GPC_VERSION', '3.5.4'); 18 if(!defined('GPC_VERSION2')) define('GPC_VERSION2', '03.05.04'); 19 19 ?> -
extensions/GrumPluginClasses/js/CanvasDraw.GraphClasses.js
r17562 r17735 335 335 if(value.display.visible.XY.cursorV==true || value.display.visible.XY.cursorV==false) properties.display.visible.XY.cursorV=value.display.visible.XY.cursorV; 336 336 } 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 337 342 } 338 343 } … … 847 852 if(!$.isPlainObject(values)) return(false); 848 853 849 if(values.backgroundColor !=null && $.isArray(values.backgroundColors)) properties.backgroundColors=values.backgroundColors;854 if(values.backgroundColors!=null && $.isArray(values.backgroundColors)) properties.backgroundColors=values.backgroundColors; 850 855 if(values.borderColor!=null) properties.borderColor=values.borderColor; 851 856 if(values.borderWidth!=null && values.borderWidth>=0) properties.borderWidth=values.borderWidth; -
extensions/GrumPluginClasses/js/ui.categorySelector.js
r16012 r17735 1162 1162 1163 1163 } 1164 return(options. userMode);1164 return(options.displayPath); 1165 1165 }, //setDisplayPath 1166 1166 … … 1571 1571 } 1572 1572 ).bind('click.categorySelector', 1573 {object:object, value:$(this).parent().parent().attr('cat id')},1573 {object:object, value:$(this).parent().parent().attr('catId')}, 1574 1574 function (event) 1575 1575 { -
extensions/GrumPluginClasses/js/ui.dynamicTable.js
r17562 r17735 2 2 * ----------------------------------------------------------------------------- 3 3 * file: ui.dynamicTable.js 4 * file version: 1.0. 05 * date: 2012-0 6-094 * file version: 1.0.1 5 * date: 2012-09-01 6 6 * 7 7 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses" … … 22 22 * 23 23 * | release | date | 24 * | 1.0.0 | 2012/06/09 | first release24 * | 1.0.0 | 2012/06/09 | * first release 25 25 * | | | 26 * | 1.0.1 | 2012/09/01 | * fix bugs 27 * | | | 28 * | | | * add 'group' icon 29 * | | | 30 * | | | * add 'save' button 26 31 * | | | 27 32 * | | | … … 62 67 contentLoading:null, 63 68 contentLoaded:null, 69 contentDisplayed:null, 64 70 pageChanged:null, 71 click:null, 72 saveButtonClick:null, 65 73 nbItemsPage:50, 66 74 currentPage:1, 67 75 sortBoxTitle:'Sort by', 68 76 showTotalRow:'auto', // visible, hidden, auto 77 showSaveButton:false, 69 78 footerString: 70 79 { 71 80 singular:'% item', 72 plural:'% items' 81 plural:'% items', 82 waitForDownload:'Please wait, download will start...' 73 83 }, 74 84 pagesNavigator:{}, … … 95 105 sortedColumns:[], 96 106 filteredColumns:[], 107 groupedColumns:[], 97 108 loadedData:[], 98 totalRowHasData:false 109 totalRowHasData:false, 110 downloadWaitState:false 99 111 } 100 112 ); … … 153 165 } 154 166 ), 167 footerSaveButton:$('<div/>', 168 { 169 'class':'ui-dynamicTableFooter-saveButton' 170 } 171 ), 155 172 footerNbItems:$('<div/>', 156 173 { … … 174 191 .append(objects.totalRowContent.append(objects.totalRowTr)) 175 192 .append(objects.footer 193 .append(objects.footerSaveButton) 176 194 .append(objects.footerNbItems) 177 195 .append(objects.footerPagesNavigator) … … 303 321 }, // footerString 304 322 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 305 344 autoLoad: function (value) 306 345 { … … 347 386 348 387 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 349 411 currentPage: function (value) 350 412 { … … 473 535 }, // maxHeight 474 536 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 475 598 contentLoading: function (value) 476 599 { 477 if(value!=null && $.isFunction(value))600 if(value!=null && ($.isFunction(value) || value=='clear')) 478 601 { 479 602 // set selected value … … 505 628 contentLoaded: function (value) 506 629 { 507 if(value!=null && $.isFunction(value))630 if(value!=null && ($.isFunction(value) || value=='clear')) 508 631 { 509 632 // set selected value … … 533 656 }, // contentLoaded 534 657 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 535 688 pageChanged: function (value) 536 689 { 537 if(value!=null && $.isFunction(value))690 if(value!=null && ($.isFunction(value) || value=='clear')) 538 691 { 539 692 // set selected value … … 610 763 privateMethods.setAutoLoad(object, (value.autoLoad!=null)?value.autoLoad:options.autoLoad); 611 764 privateMethods.setShowTotalRow(object, (value.showTotalRow!=null)?value.showTotalRow:options.showTotalRow); 765 privateMethods.setShowSaveButton(object, (value.showSaveButton!=null)?value.showSaveButton:options.showSaveButton); 612 766 privateMethods.setPostData(object, (value.postData!=null)?value.postData:options.postData); 613 767 privateMethods.setPostUrl(object, (value.postUrl!=null)?value.postUrl:options.postUrl); … … 624 778 privateMethods.setEventContentLoading(object, (value.contentLoading!=null)?value.contentLoading:options.contentLoading); 625 779 privateMethods.setEventContentLoaded(object, (value.contentLoaded!=null)?value.contentLoaded:options.contentLoaded); 780 privateMethods.setEventContentDisplayed(object, (value.contentDisplayed!=null)?value.contentDisplayed:options.contentDisplayed); 626 781 privateMethods.setEventPageChanged(object, (value.pageChanged!=null)?value.pageChanged:options.pageChanged); 782 privateMethods.setEventSaveButtonClick(object, (value.saveButtonClick!=null)?value.saveButtonClick:options.saveButtonClick); 627 783 privateMethods.setEventClick(object, (value.click!=null)?value.click:options.click); 628 784 … … 662 818 663 819 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 665 837 666 838 … … 696 868 newCol.width=(value.width!=null)?value.width:''; 697 869 newCol.sortable=(value.sortable=='asc' || value.sortable=='desc')?value.sortable:'no'; 870 newCol.group=(value.group==true||value.group==false)?value.group:false; 698 871 newCol.filter=null; 699 872 … … 767 940 options.footerString.plural=value.plural; 768 941 942 if((!properties.initialized || value.waitForDownload!=null) && value.waitForDownload!='' && value.waitForDownload!=options.footerString.waitForDownload) 943 options.footerString.waitForDownload=value.waitForDownload; 944 769 945 privateMethods.updateNbItems(object); 770 946 } … … 779 955 }, // setFooterString 780 956 781 setD ialogsButtons: function (object, value)957 setDownloadWaitState: function (object, value) 782 958 { 783 959 var options=object.data('options'), 784 960 properties=object.data('properties'); 785 961 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 786 975 787 976 if($.isPlainObject(value)) … … 832 1021 var options=object.data('options'); 833 1022 1023 if(value=='clear') value=null; 834 1024 options.contentLoading=value; 835 1025 object.unbind('dynamicTableContentLoading'); … … 842 1032 var options=object.data('options'); 843 1033 1034 if(value=='clear') value=null; 844 1035 options.contentLoaded=value; 845 1036 object.unbind('dynamicTableContentLoaded'); … … 848 1039 }, //setEventContentLoaded 849 1040 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 850 1052 setEventPageChanged : function (object, value) 851 1053 { 852 1054 var options=object.data('options'); 853 1055 1056 if(value=='clear') value=null; 854 1057 options.pageChanged=value; 855 1058 object.unbind('dynamicTablePageChanged'); … … 863 1066 objects=object.data('objects'); 864 1067 1068 if(value=='clear') value=null; 865 1069 options.click=value; 866 1070 objects.content.find('tr').unbind('click.dynamicTable'); … … 876 1080 return(options.click); 877 1081 }, //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 878 1102 879 1103 setNbItems: function (object, value) … … 981 1205 if(options.columns[i].filter!=null) 982 1206 { 1207 // filter button 983 1208 button=$('<div/>', 984 1209 { … … 1039 1264 ); 1040 1265 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 1042 1300 1043 1301 objects.headerTr.append(td); … … 1111 1369 loadContent : function (object, page) 1112 1370 { 1113 var data=null, 1371 var tmpData=null, 1372 data=null, 1114 1373 tr=null, 1115 1374 td=null, … … 1127 1386 data.currentPage=options.currentPage; 1128 1387 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; 1144 1393 1145 1394 if(options.contentLoading) object.trigger('dynamicTableContentLoading', data); … … 1178 1427 for(var col=0;col<msg.rows[row].length;col++) 1179 1428 { 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 } 1184 1436 } 1185 1437 objects.content.append(tr); … … 1228 1480 privateMethods.showTotalRow(object); 1229 1481 privateMethods.setColumnsSize(object); 1482 1483 if(options.contentDisplayed) object.trigger('dynamicTableContentDisplayed', msg); 1230 1484 privateMethods.displayLoading(object, false); 1231 1485 }, … … 1239 1493 ); 1240 1494 }, //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 1241 1525 1242 1526 setColumnsSize : function (object) … … 1364 1648 } 1365 1649 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 1368 1699 }; 1369 1700 -
extensions/GrumPluginClasses/js/ui.inputFilterBox.js
r17562 r17735 31 31 */ 32 32 33 33 34 var 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 }; 50 51 51 52 ( -
extensions/GrumPluginClasses/js/ui.inputPath.js
r17562 r17735 607 607 { 608 608 var item=privateMethods.getItemLevel(event.data, $(this).attr('ip-level')); 609 event.data.trigger('inputPathClick', item); 609 610 610 if(options.autoSetLevel) 611 611 privateMethods.setLevel(event.data, item.level); 612 613 event.data.trigger('inputPathClick', item); 612 614 } 613 615 } -
extensions/GrumPluginClasses/js/ui.inputText.js
r16012 r17735 2 2 * ----------------------------------------------------------------------------- 3 3 * file: ui.inputText.js 4 * file version: 1.1. 25 * date: 2012-0 6-184 * file version: 1.1.3 5 * date: 2012-09-03 6 6 * 7 7 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses" … … 34 34 * | | | * fix bug on regExp option 35 35 * | | | 36 * | 1.1.3 | 2012/09/03 | * fix bug on initial value settings & check value validity 37 * | | | 36 38 * | | | 37 39 * | | | … … 88 90 initialized:false, 89 91 re:/.*/, 90 value: 0,92 value:'', 91 93 isValid:true, 92 94 languagesValues:{} … … 601 603 { 602 604 var objects=object.data('objects'), 603 properties=object.data('properties'); 605 properties=object.data('properties'), 606 check=false; 604 607 605 608 if(value=='check') 609 { 606 610 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) 609 615 { 610 616 properties.isValid=value; -
extensions/GrumPluginClasses/language/en_UK/plugin.lang.php
r7199 r17735 15 15 $lang['All the gallery'] = 'All the gallery'; 16 16 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 17 40 ?> -
extensions/GrumPluginClasses/language/fr_FR/plugin.lang.php
r12215 r17735 30 30 $lang['Your message was sent to the webmaster!']='Votre message a bien été transmis !'; 31 31 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 32 54 ?> -
extensions/GrumPluginClasses/main.inc.php
r17562 r17735 2 2 /* 3 3 Plugin Name: Grum Plugins Classes.3 4 Version: 3.5. 34 Version: 3.5.4 5 5 Description: Collection de classes partagées entre mes plugins (existants, ou à venir) / Partaged classes between my plugins (actuals or futures) 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=199 … … 183 183 | | | . Error message when on page using GPC tabsheets 184 184 | | | 185 | 3.5.4 | 2012/08/29 | * Add ui.inputTreeList object 186 | | | 187 | | | * Improve ui.dynamicTable object 188 | | | 189 | | | 190 | | | 191 | | | 185 192 | | | 186 193 | | |
Note: See TracChangeset
for help on using the changeset viewer.