Changeset 6174
- Timestamp:
- May 13, 2010, 10:12:38 PM (14 years ago)
- Location:
- extensions/GrumPluginClasses
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GrumPluginClasses/classes/GPCRequestBuilder.class.inc.php
r6106 r6174 100 100 101 101 102 /** 103 * this function is called by the request builder to make the search page, and 104 * must return the HTML & JS code of the dialogbox used to select criterion 105 * 106 * Notes : 107 * - the dialogbox is a JS object with a public method 'show' 108 * - when the method show is called, one parameter is given by the request 109 * builder ; the parameter is an object defined as this : 110 * { 111 * cBuilder: an instance of the criteriaBuilder object used in the page, 112 * } 113 * 114 * 115 * 116 * 117 * @param String $mode : can take 'admin' or 'public' values, allowing to 118 * return different interface if needed 119 * @return String : HTML formatted value 120 */ 121 static public function getInterfaceContent($mode='admin') 122 { 123 return(""); 124 } 125 126 /** 127 * this function returns the label displayed in the criterion menu 128 * 129 * @return String : label displayed in the criterions menu 130 */ 131 static public function getInterfaceLabel() 132 { 133 return(l10n('gpc_rb_unknown_interface')); 134 } 135 136 /** 137 * this function returns the name of the dialog box class 138 * 139 * @return String : name of the dialogbox class 140 */ 141 static public function getInterfaceDBClass() 142 { 143 return(''); 144 } 145 146 102 147 } 103 148 … … 119 164 * @return Boolean : true if registering is Ok, otherwise false 120 165 */ 121 static public function register($pluginName, $fileName )166 static public function register($pluginName, $fileName, $dialogBoxObject) 122 167 { 123 168 $config=Array(); … … 127 172 'name' => $pluginName, 128 173 'fileName' => $fileName, 174 'dialogBox' => $dialogBoxObject, 129 175 'date' => date("Y-m-d H:i:s"), 130 176 'version' => self::$version, … … 880 926 881 927 928 929 /** 930 * display search page 931 */ 932 static public function displaySearchPage() 933 { 934 global $template, $lang; 935 936 load_language('rbuilder.lang', GPC_PATH); 937 938 $template->set_filename('gpc_search_page', 939 dirname(dirname(__FILE__)).'/templates/GPCRequestBuilder_search.tpl'); 940 941 $registeredPlugin=self::getRegistered(); 942 $dialogBox=Array(); 943 foreach($registeredPlugin as $key=>$val) 944 { 945 if(array_key_exists($key, $registeredPlugin)) 946 { 947 if(file_exists($registeredPlugin[$key]['fileName'])) 948 { 949 include_once($registeredPlugin[$key]['fileName']); 950 951 $dialogBox[]=Array( 952 'handle' => $val['name'].'DB', 953 'dialogBoxClass' => call_user_func(Array('RBCallBack'.$key, 'getInterfaceDBClass')), 954 'label' => call_user_func(Array('RBCallBack'.$key, 'getInterfaceLabel')), 955 'content' => call_user_func(Array('RBCallBack'.$key, 'getInterfaceContent')), 956 ); 957 } 958 } 959 } 960 961 $datas=Array( 962 'dialogBox' => $dialogBox, 963 'themeName' => $template->get_themeconf('name'), 964 ); 965 966 $template->assign('datas', $datas); 967 968 return($template->parse('gpc_search_page', true)); 969 } //displaySearchPage 970 882 971 } 883 972 -
extensions/GrumPluginClasses/classes/GPCTabSheet.class.inc.php
r5918 r6174 62 62 } 63 63 64 65 function add($name, $caption, $url, $selected = false, $onClick='') 66 { 67 if(parent::add($name,$caption,$url,$selected)) 68 { 69 $this->sheets[$name]['onClick'] = $onClick; 70 return(true); 71 } 72 return(false); 73 } 64 74 65 75 public function setClasses($classes) -
extensions/GrumPluginClasses/css/rbuilder.css
r6106 r6174 19 19 margin-left:0px; 20 20 } 21 22 .cPnActive, .cPnDisabled, .cPnInactive { margin:2px; padding:2px; min-width:20px; text-align:center; } 23 .pnInactiveclear, .pnInactiveroma { cursor:pointer; } 24 .pnInactiveclear:hover { background:#F1F1F1; } 25 .pnActiveclear { background:#F1F1F1; font-weight:bold; } 26 .pnInactiveroma:hover { background:#999999; color:#444444; } 27 .pnActiveroma { background:#999999; color:#444444; font-weight:bold; } 28 #iPagesNavigator ul { margin:0px; } 29 30 31 .cbGroup { border-width:1px; border-style:solid; padding:0px; margin:2px; min-height:30px; list-style:none; } 32 .cbItem { padding:2px; margin:8px; min-height:34px; list-style:none; } 33 34 #iListSelectedCriterions { padding:0px; } 35 36 #dragHelper ul li.cbItem { padding:2px; } 37 #dragHelper ul li { 38 clear:both; 39 min-height:32px; 40 list-style-image:none; 41 list-style-position:outside; 42 list-style-type:none; 43 margin:4px; 44 padding:0px; 45 } 46 47 .cbItemButtons { padding:2px; } 48 .cbItem img { cursor: pointer; } 49 50 .cbSortHandle { cursor:move; } 51 52 53 .helper { 54 border:2px dashed #777777; 55 } 56 57 div.cbOperator { 58 cursor:pointer; 59 padding:4px; 60 text-align:left; 61 font-weight:bold; 62 } 63 64 div.cbOperatorBgroma { 65 background:#333333; 66 } 67 68 div.cbOperatorBgclear { 69 background:#dbe8f3; 70 } 71 72 .cbButtons { 73 float:left; 74 margin:2px; 75 padding:8px; 76 height:15px; 77 } 78 79 80 div#iMenuCriterions div#iMenuCItems { 81 display:none; 82 list-style-type:none; 83 max-height:30px; 84 position:absolute; 85 padding:0px; 86 margin:36px 2px 2px; 87 } 88 89 90 div#iMenuCriterions ul { 91 padding:2px; 92 } 93 94 div#iMenuCriterions ul li { 95 list-style-type:none; 96 padding:4px; 97 } 98 99 div#iMenuCriterions:hover div#iMenuCItems 100 { 101 cursor:pointer; 102 display:block; 103 } 104 105 div#iMenuCriterions:hover div#iMenuCTitle 106 { 107 margin-bottom:0px; 108 padding-bottom:11px; 109 } 110 111 div#iMenuCriterions div#iMenuCTitle 112 { 113 margin-bottom:3px; -
extensions/GrumPluginClasses/templates/GPCTabSheet.tpl
r5918 r6174 1 1 {if isset($tabsheet) and count($tabsheet)} 2 2 <ul {if isset($tabsheet_classes)}class="{$tabsheet_classes}"{/if} {if isset($tabsheet_id)}id="{$tabsheet_id}"{/if} > 3 {foreach from=$tabsheet key=name item=sheet }4 <li class="{if ($name == $tabsheet_selected)}selected_tab{else}normal_tab{/if}">5 <a href="{$sheet.url}"><span>{$sheet.caption}</span></a>3 {foreach from=$tabsheet key=name item=sheet name=tabs} 4 <li {if isset($tabsheet_id)}id="{$tabsheet_id}{$smarty.foreach.tabs.index}"{/if} class="{if ($name == $tabsheet_selected)}selected_tab{else}normal_tab{/if}"> 5 <a {if $sheet.url!=''}href="{$sheet.url}"{/if} {if $sheet.onClick!=''}onclick="{$sheet.onClick}"{/if} ><span>{$sheet.caption}</span></a> 6 6 </li> 7 7 {/foreach} 8 8 </ul> 9 10 {if isset($tabsheet_id)} 11 {literal} 12 <script type="text/javascript"> 13 $('#{/literal}{$tabsheet_id}{literal} li').bind('click', 14 function () 15 { 16 $('#{/literal}{$tabsheet_id}{literal} li').removeClass('selected_tab').addClass('normal_tab'); 17 $(this).removeClass('normal_tab').addClass('selected_tab'); 18 } 19 ); 20 {/literal} 21 </script> 22 23 {/if} 24 9 25 {/if}
Note: See TracChangeset
for help on using the changeset viewer.