Changeset 7318
- Timestamp:
- Oct 21, 2010, 6:15:20 PM (14 years ago)
- Location:
- extensions/ASearchEngine
- Files:
-
- 21 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ASearchEngine/ase2.css
r7196 r7318 1 /* ---- Generic properties ---- */ 2 /* colors are defined in a theme specific CSS file */ 3 .ui-dialog-titlebar { 4 border-bottom:1px solid; 5 font-size:120%; 6 font-weight:bold; 7 margin-bottom:5px; 8 padding:2px; 9 } 10 .ui-icon-closethick { display: none; } 11 .ui-dialog-buttonpane { padding: 5px; } 12 .ui-dialog-buttonpane button { margin:0px 5px; } 13 .ui-datepicker { border:1px solid; margin-top:-1px; padding:2px; } 14 .ui-datepicker .ui-datepicker-header { margin:-2px; } 15 .ui-datepicker td, .ui-datepicker td:hover { text-decoration:none; margin:2px; 16 -moz-border-radius:3px; 17 -webkit-border-radius:3px; 18 -khtml-border-radius:3px; 19 border-radius:3px; 20 } 21 .ui-datepicker td.ui-datepicker-current-day { font-weight:bold; } 22 .ui-datepicker td a { border:none; } 23 .ui-datepicker .ui-datepicker-header a { width:auto; } 24 .ui-datepicker .ui-datepicker-header a.ui-datepicker-prev { left:0px; } 25 .ui-datepicker .ui-datepicker-header a.ui-datepicker-next { right:0px; } 26 .ui-datepicker .ui-datepicker-header a span { 27 left:0; 28 margin-left:4px; 29 margin-right:4px; 30 position:relative; 31 cursor:pointer; 32 } 1 33 34 .ui-category-selector { cursor:default; padding:2px; border:1px solid; } 35 .ui-category-selector-status { margin:3px; padding-left:3px; float:right; font-size:8px; } 36 .ui-category-selector-list { 37 margin-top:-1px; 38 cursor:default; 39 font-size:14px; 40 font-family:sans-serif; 41 border:1px solid; 42 } 43 .ui-category-selector-item { min-height:15px; } 44 li.ui-category-selector-item div { margin:2px; } 45 .ui-category-selector-expandable-item, 46 .ui-category-selector-collapsable-item { background: none no-repeat scroll 0px 0px; } 47 .ui-category-selector-check { 48 position:absolute; 49 left:0px; 50 width:15px; 51 height:15px; 52 background: none no-repeat scroll 0px 0px; 53 } 54 55 56 div#iMenuCriterions ul { margin-top:0px; } 57 .formtable, .formtable P { text-align:justify; display:block; margin-left:0px; } 58 .formtable tr { vertical-align:top; } 59 .pnInactive { cursor:pointer; } 60 .rbResultItemDetail hr { border:none; border-top:1px solid; } 61 62 63 /* AMD specific css */ 64 #iTagList { list-style-type:none; padding:0px; margin:0px; } 65 span.tagName { 66 display:inline-block; 67 margin-right:2px; 68 padding:2px 0 1px; 69 width:240px; 70 } 71 #iTagList li { padding: 0px 2px; } 72 #iTagList li:hover { cursor:pointer; } 73 .ruleTypeM, .ruleTypeM2 { display:inline-block; padding:0 2px 0; } 74 div.ruleTypeM { width:493px; } 75 div.ruleTypeM2 { width:400px; } 76 div.ruleSelector { float:left; width:150px; } 77 div.ruleProperties { padding-top:2px; } 78 79 /* GMaps specific CSS */ 80 #iDialogGMapNfo { margin:4px 30px; } 81 82 -
extensions/ASearchEngine/ase_pip.class.inc.php
r7196 r7318 15 15 16 16 include_once('ase_root.class.inc.php'); 17 include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCPublicIntegration.class.inc.php'); 18 include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCRequestBuilder.class.inc.php'); 19 17 20 18 21 class ASE_PIP extends ASE_root 19 22 { 20 23 const SEARCH_SECTION = 'Search'; 24 protected $sectionPage; 21 25 protected $css2; 22 26 … … 28 32 $this->initEvents(); 29 33 $this->load_lang(); 34 35 $this->sectionPage=new GPCPublicIntegration(self::SEARCH_SECTION); 36 $this->sectionPage->setCallbackPageFunction(array(&$this, 'managePage')); 37 $this->sectionPage->initEvents(); 30 38 } 31 39 32 40 public function __destruct() 33 41 { 42 unset($section_page); 43 34 44 parent::__destruct(); 35 45 } … … 52 62 parent::initEvents(); 53 63 54 add_event_handler('loc_end_page_header', array(&$this->css2, 'applyCSS')); 64 GPCRequestBuilder::loadJSandCSS(); 65 66 add_event_handler('init', array(&$this, 'applyJS')); 67 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) 68 add_event_handler('blockmanager_apply', array(&$this, 'blockmanagerApply'), 55); 55 69 } 56 70 … … 61 75 ------------------------------------------------------------------------- */ 62 76 77 public function applyJS() 78 { 79 global $template; 80 81 GPCCore::addHeaderJS('jquery', 'themes/default/js/jquery.packed.js'); 82 83 $theme=$template->get_themeconf('name'); 84 85 $file='plugins/ASearchEngine/themes/'.$theme.'/ASE'.$theme.'.css'; 86 if(($theme=='Sylvia' or 87 $theme=='clear' or 88 $theme=='dark') and 89 file_exists(GPCCore::getPiwigoSystemPath().'/'.$file)) GPCCore::addHeaderCSS('ASE0', $file); 90 91 $file='themes/'.$theme.'/css/ASE'.$theme.'.css'; 92 if(file_exists(GPCCore::getPiwigoSystemPath().'/'.$file)) GPCCore::addHeaderCSS('ASE1', $file); 93 94 $file='local/css/ASE'.$theme.'.css'; 95 if(file_exists(GPCCore::getPiwigoSystemPath().'/'.$file)) GPCCore::addHeaderCSS('ASE2', $file); 96 } 97 98 public function managePage() 99 { 100 global $page, $conf, $template; 101 102 /* 103 * make the title bar 104 */ 105 $page['title'].=$conf['level_separator'].l10n('ase_search_with_multiple_criteria'); 106 $template->assign('TITLE', $page['title']); 107 108 $template->clear_assign(array('U_MODE_CREATED', 'U_MODE_POSTED')); 109 110 /* 111 * display empty template 112 * (all content are managed with ajax) 113 */ 114 115 $template->set_filename('main', dirname(__FILE__)."/templates/search_page.tpl"); 116 117 $template->assign('ase_search_page', GPCRequestBuilder::displaySearchPage($this->config['ase_publicAccess_allowedPlugins'])); 118 119 $template->assign_var_from_handle('PLUGIN_INDEX_CONTENT_BEGIN', 'main'); 120 } 121 122 123 /** 124 * replace the piwigo search.php url by ?/aSearch url 125 */ 126 public function blockmanagerApply($menu_ref_arr) 127 { 128 global $user, $page; 129 $menu = & $menu_ref_arr[0]; 130 131 if($this->config['ase_publicAccess_active']) 132 { 133 $block=$menu->get_block('mbMenu'); 134 $block->data['search']['URL']=get_root_url().'?/'.self::SEARCH_SECTION; 135 } 136 } 63 137 64 138 -
extensions/ASearchEngine/ase_rb_callback.class.inc.php
r7196 r7318 103 103 static public function getFilter($param="") 104 104 { 105 return( self::getWhere($param));105 return(""); 106 106 } 107 107 -
extensions/ASearchEngine/ase_rb_callback_category.class.inc.php
r7196 r7318 62 62 global $user; 63 63 64 $returned=array(); 64 65 if($param['subCat']=='y') 65 66 { 66 67 foreach($param['catIdList'] as $catId) 67 68 { 68 $returned .=" ORFIND_IN_SET($catId, ase_pct.uppercats) ";69 $returned[]=" FIND_IN_SET($catId, ase_pct.uppercats) "; 69 70 } 70 71 } 71 72 72 return( $returned);73 return(implode(' OR ', $returned)); 73 74 } 74 75 … … 96 97 static public function getFilter($param="") 97 98 { 98 return( self::getWhere($param));99 return(""); 99 100 } 100 101 -
extensions/ASearchEngine/ase_rb_callback_date.class.inc.php
r7196 r7318 119 119 static public function getFilter($param="") 120 120 { 121 return( self::getWhere($param));121 return(""); 122 122 } 123 123 -
extensions/ASearchEngine/ase_rb_callback_hd.class.inc.php
r7196 r7318 99 99 static public function getFilter($param="") 100 100 { 101 return( self::getWhere($param));101 return(""); 102 102 } 103 103 -
extensions/ASearchEngine/ase_rb_callback_keyword.class.inc.php
r7196 r7318 148 148 static public function getFilter($param="") 149 149 { 150 return( self::getWhere($param));150 return(""); 151 151 } 152 152 -
extensions/ASearchEngine/ase_rb_callback_rate.class.inc.php
r7196 r7318 108 108 static public function getFilter($param="") 109 109 { 110 return( self::getWhere($param));110 return(""); 111 111 } 112 112 -
extensions/ASearchEngine/ase_root.class.inc.php
r7207 r7318 152 152 dirname(__FILE__).'/templates/ase_dialog_tag_choose.tpl'); 153 153 154 $datas=Array();155 156 $template->assign('datas', $datas);157 158 154 return($template->parse('ase_tag_choose', true)); 159 155 } … … 171 167 dirname(__FILE__).'/templates/ase_dialog_category_choose.tpl'); 172 168 173 $datas=Array();174 175 $template->assign('datas', $datas);176 177 169 return($template->parse('ase_category_choose', true)); 178 170 } … … 189 181 dirname(__FILE__).'/templates/ase_dialog_date_choose.tpl'); 190 182 191 $datas=Array();192 193 $template->assign('datas', $datas);194 195 183 return($template->parse('ase_date_choose', true)); 196 184 } … … 207 195 dirname(__FILE__).'/templates/ase_dialog_keyword_choose.tpl'); 208 196 209 $ datas=Array();210 211 $template->assign(' datas', $datas);197 $config=array(); 198 GPCCore::loadConfig('ase', $config); 199 $template->assign('aseConfig', $config); 212 200 213 201 return($template->parse('ase_keyword_choose', true)); … … 225 213 dirname(__FILE__).'/templates/ase_dialog_hd_choose.tpl'); 226 214 227 $datas=Array();228 229 $template->assign('datas', $datas);230 231 215 return($template->parse('ase_hd_choose', true)); 232 216 } … … 243 227 dirname(__FILE__).'/templates/ase_dialog_rate_choose.tpl'); 244 228 245 $datas=Array();246 247 $template->assign('datas', $datas);248 249 229 return($template->parse('ase_rate_choose', true)); 250 230 } -
extensions/ASearchEngine/ase_version.inc.php
r7196 r7318 17 17 define('ASE_VERSION', '0.1.0'); 18 18 define('ASE_VERSION2', '00.01.00'); 19 define('ASE_GPC_NEEDED', '3.3. 1');19 define('ASE_GPC_NEEDED', '3.3.2'); 20 20 ?> -
extensions/ASearchEngine/templates/ase_dialog_category_choose.tpl
r7196 r7318 90 90 listMaxWidth:1, 91 91 listMaxHeight:350, 92 displayStatus: true,92 displayStatus:{/literal}{if is_admin()}true{else}false{/if}{literal}, 93 93 levelIndent:20, 94 userMode: 'admin',94 userMode:{/literal}{if is_admin()}'admin'{else}'public'{/if}{literal}, 95 95 galleryRoot:false, 96 96 load: function (event) { $(this).categorySelector('collapse', ':all'); }
Note: See TracChangeset
for help on using the changeset viewer.