Changeset 16008 for extensions/ASearchEngine
- Timestamp:
- Jun 24, 2012, 9:15:21 PM (12 years ago)
- Location:
- extensions/ASearchEngine
- Files:
-
- 2 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ASearchEngine/ase_aip.class.inc.php
r15360 r16008 63 63 GPCRequestBuilder::loadJSandCSS(); 64 64 } 65 add_event_handler('loc_end_page_header', array(&$this->css, 'applyCSS')); 66 GPCCss::applyGpcCss(); 65 } 66 67 public function loadCSS() 68 { 69 global $template; 70 71 parent::loadCSS(); 72 GPCCore::addUI('gpcCSS'); 73 GPCCore::addHeaderCSS('ase.css', 'plugins/'.$this->getDirectory().'/'.$this->getPluginNameFiles().".css"); 67 74 } 68 75 … … 138 145 global $template; 139 146 140 GPCCore::addHeaderCSS('categorySelector', 'plugins/GrumPluginClasses/css/categorySelector_'.$template->get_themeconf('name').'.css'); 141 GPCCore::addHeaderCSS('tagSelector', 'plugins/GrumPluginClasses/css/tagSelector_'.$template->get_themeconf('name').'.css'); 142 147 GPCCore::addUI('inputTag,categorySelector'); 143 148 144 149 $template->set_filename('body_page', -
extensions/ASearchEngine/ase_ajax.php
r7207 r16008 25 25 */ 26 26 if(!isset($_REQUEST['ajaxfct'])) $_REQUEST['ajaxfct']=''; 27 if(preg_match('/^admin\./i', $_REQUEST['ajaxfct'])) 28 { 29 define('IN_ADMIN', true); 30 } 27 if(preg_match('/^admin\./i', $_REQUEST['ajaxfct'])) define('IN_ADMIN', true); 28 if(!defined('AJAX_CALL')) define('AJAX_CALL', true); 29 31 30 32 31 // the common.inc.php file loads all the main.inc.php plugins files … … 59 58 global $user; 60 59 61 if(!isset($_REQUEST['ajaxfct'])) $_REQUEST['ajaxfct']='';60 GPCAjax::checkToken(); 62 61 63 62 // check if asked function is valid 64 if(!($_REQUEST[ 'ajaxfct']=='admin.config.setConfig'65 )) $_REQUEST[ 'ajaxfct']='';63 if(!($_REQUEST[GPC_AJAX]=='admin.config.setConfig' 64 )) $_REQUEST[GPC_AJAX]=''; 66 65 67 if(preg_match('/^admin\./i', $_REQUEST[ 'ajaxfct']) and !is_admin()) $_REQUEST['ajaxfct']='';66 if(preg_match('/^admin\./i', $_REQUEST[GPC_AJAX]) and !is_admin()) $_REQUEST[GPC_AJAX]=''; 68 67 69 68 70 if($_REQUEST[ 'ajaxfct']!='')69 if($_REQUEST[GPC_AJAX]!='') 71 70 { 72 71 … … 82 81 $result="<p class='errors'>An error has occured</p>"; 83 82 84 switch($_REQUEST[ 'ajaxfct'])83 switch($_REQUEST[GPC_AJAX]) 85 84 { 86 85 case 'admin.config.setConfig': 87 $result=$this->ajax_gmaps_admin_mapsGetList();88 86 break; 89 87 } -
extensions/ASearchEngine/ase_pip.class.inc.php
r15360 r16008 23 23 const SEARCH_SECTION = 'ASearch'; 24 24 protected $sectionPage; 25 protected $css2;26 25 27 26 public function __construct($prefixeTable, $filelocation) 28 27 { 28 global $template; 29 29 30 parent::__construct($prefixeTable, $filelocation); 30 $this->css2 = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles()."2.css",10);31 31 $this->loadConfig(); 32 32 … … 72 72 73 73 add_event_handler('init', array(&$this, 'applyJS')); 74 add_event_handler('loc_begin_page_header', array(&$this->css2, 'applyCSS'), 9); // have to be loaded before other css file (event level from GPCCore=10)75 74 add_event_handler('user_init', array(&$this, 'load_lang')); 76 75 } 77 76 } 78 77 79 78 public function loadCSS() 79 { 80 GPCCore::addHeaderCSS('ase.css2', 'plugins/'.$this->getDirectory().'/'.$this->getPluginNameFiles()."2.css",9); // have to be loaded before other css file (event level from GPCCore=10) 81 } 80 82 81 83 /* ------------------------------------------------------------------------- … … 104 106 $file=PHPWG_ROOT_PATH.PWG_LOCAL_DIR.'local/css/ASE'.$theme.'.css'; 105 107 if(file_exists(GPCCore::getPiwigoSystemPath().'/'.$file)) GPCCore::addHeaderCSS('ASE2', $file, 45); 108 109 /* 110 $template->set_filename('ASEheader', dirname(__FILE__)."/templates/search_page_header.tpl"); 111 $template->block_html_head(null, $template->parse('ASEheader', true), null, null); 112 */ 106 113 } 107 114 … … 116 123 $template->assign('TITLE', $page['title']); 117 124 125 GPCCore::AddUI('inputTag,categorySelector'); 126 118 127 $template->clear_assign(array('U_MODE_CREATED', 'U_MODE_POSTED')); 119 128 … … 122 131 * (all content are managed with ajax) 123 132 */ 133 134 $template->assign( 135 array( 136 'derivative_params' =>trigger_event('get_index_derivative_params', ImageStdParams::get_by_type( pwg_get_session_var('index_deriv', IMG_THUMB) ) ) 137 ) 138 ); 124 139 125 140 $template->set_filename('ASEmain', dirname(__FILE__)."/templates/search_page.tpl"); -
extensions/ASearchEngine/ase_root.class.inc.php
r15360 r16008 14 14 --------------------------------------------------------------------------- */ 15 15 include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php'); 16 include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCCss.class.inc.php');17 16 18 17 class ASE_root extends CommonPlugin 19 18 { 20 protected $css;21 22 19 public function __construct($prefixeTable, $filelocation) 23 20 { … … 26 23 parent::__construct($prefixeTable, $filelocation); 27 24 $this->section_name=$this->getPluginNameFiles(); 28 29 $this->css = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles().".css");30 25 } 31 26 … … 35 30 } 36 31 37 public function initEvents()38 {39 }40 32 41 33 -
extensions/ASearchEngine/main.inc.php
r15360 r16008 85 85 global $prefixeTable; 86 86 87 if( defined('IN_ADMIN'))87 if(!defined('AJAX_CALL')) 88 88 { 89 //ASE admin interface loaded and active only if in admin page 90 include_once("ase_aim.class.inc.php"); 91 $obj=new ASE_AIM($prefixeTable, __FILE__); 92 $obj->initEvents(); 93 } 94 else 95 { 96 if(CommonPlugin::checkGPCRelease(ASE_GPC_NEEDED)) 89 if(defined('IN_ADMIN')) 97 90 { 98 //ASE public interface loaded and active only if in public page 99 include_once("ase_pip.class.inc.php"); 100 $obj=new ASE_PIP($prefixeTable, __FILE__); 91 //ASE admin interface loaded and active only if in admin page 92 include_once("ase_aim.class.inc.php"); 93 $obj=new ASE_AIM($prefixeTable, __FILE__); 94 $obj->initEvents(); 95 } 96 else 97 { 98 if(CommonPlugin::checkGPCRelease(ASE_GPC_NEEDED) and !mobile_theme()) 99 { 100 //ASE public interface loaded and active only if in public page 101 include_once("ase_pip.class.inc.php"); 102 $obj=new ASE_PIP($prefixeTable, __FILE__); 103 } 101 104 } 102 105 } -
extensions/ASearchEngine/templates/ase_dialog_category_choose.tpl
r15360 r16008 1 {combine_script id="gpc.categorySelector" path="plugins/GrumPluginClasses/js/ui.categorySelector.js" require='jquery,jquery.ui'}2 {combine_css path="plugins/GrumPluginClasses/css/categorySelector.css"}3 4 1 {literal} 5 2 <style type='text/css'> -
extensions/ASearchEngine/templates/ase_dialog_tag_choose.tpl
r15360 r16008 1 {combine_script id="gpc.tagSelector" path="plugins/GrumPluginClasses/js/ui.tagSelector.js" require='jquery,jquery.ui'}2 3 1 {literal} 4 2 … … 48 46 if(checkValidity()) 49 47 { 50 dialogOptions.values.tags=$("#iBDTagTags"). tagSelector('value');48 dialogOptions.values.tags=$("#iBDTagTags").inputTag('value'); 51 49 dialogOptions.values.method=$('[name=fBDTagMethod]:checked').val(); 52 50 … … 72 70 ); 73 71 74 $("#iBDTagTags"). tagSelector(72 $("#iBDTagTags").inputTag( 75 73 { 74 serverUrl:"plugins/GrumPluginClasses/gpc_ajax.php", 76 75 listMaxWidth:400, 77 76 listMaxHeight:350, … … 102 101 returned=true; 103 102 104 if($('#iBDTagTags'). tagSelector('numberOfTags')==0)103 if($('#iBDTagTags').inputTag('numberOfTags')==0) 105 104 { 106 105 $('#iBDTagTags').addClass('error'); … … 172 171 } 173 172 174 $("#iBDTagTags"). tagSelector('value', 'clear').tagSelector('value', dialogOptions.values.tags);173 $("#iBDTagTags").inputTag('value', 'clear').inputTag('value', dialogOptions.values.tags); 175 174 $('#iBDTagMethodAND').attr('checked', dialogOptions.values.method=='AND'); 176 175 $('#iBDTagMethodOR').attr('checked', dialogOptions.values.method=='OR'); -
extensions/ASearchEngine/templates/search_page.tpl
r7328 r16008 1 {html_style} 2 ul.rbResultList li td.rbResultItemImg 3 {ldelim} 4 width:{$derivative_params->max_width()}px; 5 height:{$derivative_params->max_height()}px; 6 } 7 {/html_style} 8 1 9 {$ase_search_page} -
extensions/ASearchEngine/themes/Sylvia/ASESylvia.css
r15360 r16008 30 30 31 31 32 .ui-category-selector-arrow { color:#FF3333; } 32 .ui-category-selector-arrow { 33 background-image: url("buttons.png"); 34 background-position: -30px -30px; 35 background-repeat: no-repeat; 36 border: 0 none; 37 border-radius: 2px 2px 2px 2px; 38 } 39 .ui-category-selector-arrow:hover { 40 background-position: -30px -15px; 41 } 42 33 43 li.ui-category-selector-item:hover, li.ui-tag-selector-list-item:hover { background-color:#303030; } 34 44 .ui-category-selector-selected-item { background-color:#777777; } 45 46 li.ui-category-selector-item div { margin:0;} 47 li.ui-category-selector-item div.ui-category-selector-name { top:-1px; position:relative;} 48 li.ui-category-selector-item div.ui-category-selector-status { margin:1px; } 49 #iASECategoryCategory div.ui-category-selector-check { 50 position:relative; 51 } 52 35 53 .ui-category-selector-expandable-item { background-image:url(expand.png); } 36 54 .ui-category-selector-collapsable-item { background-image:url(collapse.png); } … … 56 74 background:#666666; 57 75 } 58 .iconEdit { background:url(edit.png) no-repeat 0 0 transparent; } 59 .iconDelete { background:url(delete.png) no-repeat 0 0 transparent; } 60 .iconMove { background:url(move.png) no-repeat 0 0 transparent; } 61 .iconSwitchCondition { background:url(switch.png) no-repeat 0 0 transparent; } 76 77 78 .iconSwitchCondition, 79 .iconMove, 80 .iconEdit, 81 .iconDelete { 82 background:url(buttons.png) no-repeat 0 0 transparent; 83 -moz-border-radius:2px; 84 -webkit-border-radius:2px; 85 -khtml-border-radius:2px; 86 border-radius:2px; 87 } 88 89 90 .iconEdit { 91 background-position:-240px -15px; 92 } 93 .iconDelete { 94 background-position:-255px -15px; 95 } 96 .iconMove { 97 background-position:-285px -15px; 98 } 99 .iconSwitchCondition { 100 background-position:-300px -15px; 101 } 102 .iconEdit:hover { 103 background-position:-240px 0px; 104 } 105 .iconDelete:hover { 106 background-position:-255px 0px; 107 } 108 .iconMove:hover { 109 background-position:-285px 0px; 110 } 111 .iconSwitchCondition:hover { 112 background-position:-300px 0px; 113 } 114 115 62 116 .cbItemMultiple { border:1px solid #666666; } 63 117 .cbItemOverGroup { border:1px dotted #666666; } … … 97 151 } 98 152 99 .ui-category-selector-arrow {100 background:none repeat scroll 0 0 #666666;101 border-color:#999999 #444444 #444444 #999999;102 color:#FF3363;103 }104 105 .ui-category-selector-arrow-active {106 border-color:#444444 #999999 #999999 #444444;107 }108 153 109 154 … … 116 161 background-image:url(sTipArrows.png); 117 162 } 118 163 div#iMenuCriterions div#iMenuCItems { margin-left:0px; margin-top:-2px;} 119 164 120 165 /* AMD specific CSS */ -
extensions/ASearchEngine/themes/clear/ASEclear.css
r15360 r16008 28 28 .ui-datepicker td:hover { background-color:#EEEEEE; } 29 29 .ui-datepicker td.ui-datepicker-current-day { background-color:#D3D3D3; } 30 .ui-category-selector-arrow { color:#005E89; } 30 .ui-category-selector-arrow { 31 border: 0 none; 32 border-radius: 2px 2px 2px 2px; 33 } 31 34 li.ui-category-selector-item:hover, li.ui-tag-selector-list-item:hover { background-color:#EEEEEE; color:#858460; } 32 35 .ui-category-selector-selected-item { background-color:#D3D3D3; } 36 li.ui-category-selector-item div { margin:0;} 37 li.ui-category-selector-item div.ui-category-selector-name { top:-1px; position:relative;} 38 li.ui-category-selector-item div.ui-category-selector-status { margin:1px; } 39 #iASECategoryCategory div.ui-category-selector-check { 40 position:relative; 41 } 42 43 33 44 .ui-category-selector-expandable-item { background-image:url(expand.png); } 34 45 .ui-category-selector-collapsable-item { background-image:url(collapse.png); } … … 58 69 .cbItemMultiple { border:1px solid #999999; } 59 70 .cbItemOverGroup { border:1px dotted #999999; } 60 71 .iconMove, .iconEdit, .iconDelete, .iconSwitchCondition { 72 cursor: pointer; 73 display: inline-block; 74 height: 18px; 75 width: 18px; 76 } 61 77 62 78 -
extensions/ASearchEngine/themes/dark/ASEdark.css
r15360 r16008 28 28 .ui-datepicker td:hover { background-color:gray; color:fff48e; } 29 29 .ui-datepicker td.ui-datepicker-current-day { background-color:#505050; color:#fff48e; } 30 .ui-category-selector-arrow { color:#000000; } 30 .ui-category-selector-arrow { 31 border: 0 none; 32 border-radius: 2px 2px 2px 2px; 33 } 31 34 li.ui-category-selector-item:hover, li.ui-tag-selector-list-item:hover { background-color:gray; color:#fff48e; } 32 35 .ui-category-selector-selected-item { background-color:#505050; color:#fff48e; } 36 37 li.ui-category-selector-item div { margin:0;} 38 li.ui-category-selector-item div.ui-category-selector-name { top:-1px; position:relative;} 39 li.ui-category-selector-item div.ui-category-selector-status { margin:1px; } 40 #iASECategoryCategory div.ui-category-selector-check { 41 position:relative; 42 } 43 33 44 .ui-category-selector-expandable-item { background-image:url(expand_b.png); } 34 45 .ui-category-selector-collapsable-item { background-image:url(collapse_b.png); } … … 61 72 .cbItemMultiple { border:1px solid gray; } 62 73 .cbItemOverGroup { border:1px dotted gray; } 74 .iconMove, .iconEdit, .iconDelete, .iconSwitchCondition { 75 cursor: pointer; 76 display: inline-block; 77 height: 18px; 78 width: 18px; 79 } 80 63 81 64 82 .cbButtons { color:#000000; border:1px solid gray; z-index:510; } … … 133 151 background-image:url(sTipArrows.png); 134 152 } 153 div#iMenuCriterions div#iMenuCItems { margin-left:-1px; margin-top:-2px;} 135 154 136 155 -
extensions/ASearchEngine/themes/elegant/ASEelegant.css
r15360 r16008 56 56 background:#D3D3D3; 57 57 } 58 .iconEdit { background:url(edit.png) no-repeat 0 0 transparent; } 59 .iconDelete { background:url(delete.png) no-repeat 0 0 transparent; } 60 .iconMove { background:url(move.png) no-repeat 0 0 transparent; } 61 .iconSwitchCondition { background:url(switch.png) no-repeat 0 0 transparent; } 58 59 60 .iconSwitchCondition, 61 .iconMove, 62 .iconEdit, 63 .iconDelete { 64 background:url(buttons_gpc.png) no-repeat 0 0 transparent; 65 -moz-border-radius:2px; 66 -webkit-border-radius:2px; 67 -khtml-border-radius:2px; 68 border-radius:2px; 69 } 70 71 72 .iconEdit { 73 background-position:-240px -15px; 74 } 75 .iconDelete { 76 background-position:-255px -15px; 77 } 78 .iconMove { 79 background-position:-285px -15px; 80 } 81 .iconSwitchCondition { 82 background-position:-300px -15px; 83 } 84 .iconEdit:hover { 85 background-position:-240px 0px; 86 } 87 .iconDelete:hover { 88 background-position:-255px 0px; 89 } 90 .iconMove:hover { 91 background-position:-285px 0px; 92 } 93 .iconSwitchCondition:hover { 94 background-position:-300px 0px; 95 } 96 97 62 98 .cbItemMultiple { border:1px solid #666666; } 63 99 .cbItemOverGroup { border:1px dotted #666666; } … … 85 121 86 122 .ui-category-selector-arrow { 87 color:#005E89; 123 background-image: url("buttons_gpc.png"); 124 background-position: -30px -30px; 125 background-repeat: no-repeat; 126 border: 0 none; 127 border-radius: 2px 2px 2px 2px; 128 } 129 .ui-category-selector-arrow:hover { 130 background-position: -30px -15px; 88 131 } 89 132 … … 105 148 } 106 149 150 li.ui-category-selector-item div { margin:0;} 151 li.ui-category-selector-item div.ui-category-selector-name { top:-1px; position:relative;} 152 li.ui-category-selector-item div.ui-category-selector-status { margin:1px; } 153 #iASECategoryCategory div.ui-category-selector-check { 154 position:relative; 155 } 107 156 108 157 /* --- */ … … 120 169 } 121 170 122 .ui-category-selector-arrow {123 background:none repeat scroll 0 0 #999999;124 border-color:#DDDDDD #666666 #666666 #DDDDDD;125 color:#ffffff;126 }127 128 .ui-category-selector-arrow-active {129 border-color:#666666 #DDDDDD #DDDDDD #666666;130 }131 171 132 172 .cSimpleTipContent { … … 137 177 .cSimpleTipArrow { 138 178 background-image:url(sTipArrows.png); 179 } 180 div#iMenuCriterions div#iMenuCItems { margin-left:-1px; margin-top:-1px;} 181 182 div.ui-dialog-content li.valueItems { 183 background:#555555; 184 color:#cccccc; 139 185 } 140 186
Note: See TracChangeset
for help on using the changeset viewer.