diff --git a/e107_core/templates/admin_icons_template.php b/e107_core/templates/admin_icons_template.php index 2002dceb6..5b1f15642 100644 --- a/e107_core/templates/admin_icons_template.php +++ b/e107_core/templates/admin_icons_template.php @@ -441,6 +441,7 @@ define("E_32_TRUE", ""); define("ADMIN_CHILD_ICON", ''); // must use single quotes. + define("ADMIN_FILTER_ICON", ""); define("ADMIN_TRUE_ICON", ""); define("ADMIN_FALSE_ICON", ""); define("ADMIN_WARNING_ICON", ""); diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php index 476660872..d759d9e82 100644 --- a/e107_handlers/admin_ui.php +++ b/e107_handlers/admin_ui.php @@ -3011,6 +3011,7 @@ class e_admin_controller_ui extends e_admin_controller public function setTreeModel($tree_model) { $this->_tree_model = $tree_model; + return $this; } @@ -5364,6 +5365,7 @@ class e_admin_ui extends e_admin_controller_ui return; } $this->getTreeModel()->setParam('db_query', $this->_modifyListQry(false, false, false, false, $this->listQry))->load(); + $this->addTitle(); } @@ -6577,6 +6579,10 @@ class e_admin_form_ui extends e_form $perPage = $this->getController()->getPerPage(); $fromPage = $this->getController()->getQuery('from', 0); + $vars = $this->getController()->getQuery(); + $vars['from'] = '[FROM]'; + // var_dump($vars); + $paginate = http_build_query($vars); $text = "
@@ -6596,8 +6602,8 @@ class e_admin_form_ui extends e_form ".$this->select_close()."
".implode("\n", $filter_preserve_var)." - ".$this->admin_button('etrigger_filter', 'etrigger_filter', 'filter e-hide-if-js', LAN_FILTER, array('id' => false))." - ".$this->pagination(e_REQUEST_SELF.'?from=[FROM]',$totalRecords,$fromPage,$perPage,array('template'=>'basic'))." + ".$this->admin_button('etrigger_filter', 'etrigger_filter', 'filter e-hide-if-js', ADMIN_FILTER_ICON, array('id' => false,'title'=>LAN_FILTER))." + ".$this->pagination(e_REQUEST_SELF.'?'.$paginate,$totalRecords,$fromPage,$perPage,array('template'=>'basic'))." diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index 0380f9284..b3844e357 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -3427,7 +3427,7 @@ class e_parser protected $allowedTags = array('html', 'body','div','a','img','table','tr', 'td', 'th', 'tbody', 'thead', 'colgroup', 'b', 'i', 'pre','code', 'strong', 'u', 'em','ul', 'ol', 'li','img','h1','h2','h3','h4','h5','h6','p', 'div','pre','section','article', 'blockquote','hgroup','aside','figure','figcaption', 'abbr','span', 'audio', 'video', 'br', - 'small', 'caption', 'noscript', 'hr', 'section', 'iframe', 'sub', 'sup', 'cite' + 'small', 'caption', 'noscript', 'hr', 'section', 'iframe', 'sub', 'sup', 'cite', 'ins' ); protected $scriptTags = array('script','applet','form','input','button', 'embed', 'object'); //allowed when $pref['post_script'] is enabled. diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index f0f87a525..71a07e8fe 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -3141,7 +3141,7 @@ class e_form case 'filter': case 'filter e-hide-if-js': - // FIXME hide-js shouldn't be here. + $options['class'] = 'btn btn-default'; break; } @@ -4101,13 +4101,13 @@ class e_form $editIconDefault = deftrue('ADMIN_EDIT_ICON', $tp->toGlyph('fa-edit')); $deleteIconDefault = deftrue('ADMIN_DELETE_ICON', $tp->toGlyph('fa-trash')); - +/* if($attributes['grid']) { $editIconDefault = $tp->toGlyph('fa-edit'); $deleteIconDefault = $tp->toGlyph('fa-trash'); } - +*/ $value = "
"; @@ -4241,6 +4241,7 @@ class e_form //return $this->options($field, $value, $attributes, $id); // consistent method arguments, fixed in admin cron administration $attributes['type'] = null; // prevent infinite loop. + return $this->options($parms, $value, $id, $attributes); } } @@ -4662,6 +4663,20 @@ class e_form break; case 'image': //js tooltip... + + $thparms = array(); + $createLink = true; + + // Support readParms example: thumb=1&w=200&h=300 + // Support readParms example: thumb=1&aw=80&ah=30 + if(isset($parms['h'])) { $thparms['h'] = intval($parms['h']); } + if(isset($parms['ah'])) { $thparms['ah'] = intval($parms['ah']); } + if(isset($parms['w'])) { $thparms['w'] = intval($parms['w']); } + if(isset($parms['aw'])) { $thparms['aw'] = intval($parms['aw']); } + if(isset($parms['crop'])) { $thparms['crop'] = $parms['crop']; } + + + if($value) { @@ -4693,16 +4708,13 @@ class e_form - if(vartrue($parms['thumb'])) + if(!empty($parms['thumb'])) { - $thparms = array(); - - // Support readParms example: thumb=1&w=200&h=300 - // Support readParms example: thumb=1&aw=80&ah=30 - if(isset($parms['h'])) { $thparms['h'] = intval($parms['h']); } - if(isset($parms['ah'])) { $thparms['ah'] = intval($parms['ah']); } - if(isset($parms['w'])) { $thparms['w'] = intval($parms['w']); } - if(isset($parms['aw'])) { $thparms['aw'] = intval($parms['aw']); } + + if(isset($parms['link']) && empty($parms['link'])) + { + $createLink = false; + } // Support readParms example: thumb=200x300 (wxh) if(strpos($parms['thumb'],'x')!==false) @@ -4728,15 +4740,21 @@ class e_form // return print_a($thparms,true); $src = $tp->replaceConstants(vartrue($parms['pre']).$value, 'abs'); - $thsrc = $tp->thumbUrl(vartrue($parms['pre']).$value, $thparms, varset($parms['thumb_urlraw'])); + // $thsrc = $tp->thumbUrl(vartrue($parms['pre']).$value, $thparms, varset($parms['thumb_urlraw'])); $alt = basename($src); // $ttl = ''.$alt.''; $thparms['alt'] = $alt; - $thparms['class'] = "thumbnail e-thumb"; + $thparms['class'] = "thumbnail e-thumb img-responsive"; + + $ttl = $tp->toImage($value, $thparms); + if($createLink === false) + { + return $ttl; + } $value = ''.$ttl.''; @@ -4749,6 +4767,12 @@ class e_form $value = ''.defset($ttl, $ttl).''; } } + elseif(!empty($parms['fallback'])) + { + $value = $parms['fallback']; + $thparms['class'] = "thumbnail e-thumb img-responsive fallback"; + return $tp->toImage($value, $thparms); + } break; case 'files': @@ -5697,7 +5721,7 @@ class e_form } /** - * Generic List Form, used internal by admin UI + * Generic List Form, used internally by admin UI * Expected options array format: * * - -
*/ - - $template = '
'; - $template .= '{IMAGE}'; - $template .= (!empty($options['grid']['body'])) ? '
{BODY}
' : ''; - $template .= ' -
'; + if(empty($options['grid']['template'])) + { + $template = '
+
{IMAGE} +
+ {OPTIONS} +
+
+ +
'; + } + else + { + $template = $options['grid']['template']; + } + + + $cls = !empty($options['grid']['class']) ? $options['grid']['class'] : 'col-md-2'; + $pid = $options['pid']; + + $gridFields = $options['grid']; + $gridFields['options'] = 'options'; + $gridFields['checkbox'] = 'checkboxes'; + + unset($gridFields['class'],$gridFields['perPage']); - $cls = !empty($options['grid']['class']) ? $options['grid']['class'] : 'col-md-2'; - $height = !empty($options['grid']['height']) ? $options['grid']['height'] : '220px'; - $pid = $options['pid']; - $title = $options['grid']['title']; - $pic = $options['grid']['image']; - $body = $options['grid']['body']; - $fields['options']['grid'] = true; foreach($tree as $model) { @@ -5920,25 +5958,17 @@ class e_form $data = $model->getData(); $id = $data[$pid]; + $vars = array(); - $vars = array( - 'CHECKBOX' => $this->renderValue('checkboxes',$data['checkboxes'],$fields['checkboxes'],$id), - 'TITLE' => $this->renderValue($title,$data[$title],$fields[$title],$id), - 'IMAGE' => $this->renderValue($pic,$data[$pic],$fields[$pic],$id), - 'OPTIONS' => $this->renderValue('options',$data['options'], $fields['options'], $id) - ); - - if(!empty($options['grid']['body'])) + foreach($gridFields as $k=>$v) { - $vars['BODY'] = $this->renderValue($body,$data[$body],$fields[$body],$id); + $key = strtoupper($k); + $fields[$v]['grid'] = true; + $vars[$key] = $this->renderValue($v,$data[$v],$fields[$v],$id); } - $text .= "
"; - + $text .= "
"; $text .= $tp->simpleParse($template,$vars); - - - // $text .= $this->renderTableRow($fields, $current_fields, $model->getData(), $options['pid']); $text .= "
"; } @@ -5959,6 +5989,7 @@ class e_form $parms = 'total='.$total; $parms .= '&amount='.$amount; $parms .= '¤t='.$from; + if(ADMIN_AREA) { $parms .= '&tmpl_prefix=admin'; diff --git a/e107_themes/bootstrap3/admin_style.css b/e107_themes/bootstrap3/admin_style.css index ffd7ed170..add0e657b 100644 --- a/e107_themes/bootstrap3/admin_style.css +++ b/e107_themes/bootstrap3/admin_style.css @@ -59,6 +59,30 @@ a.core-mainpanel-link-icon:hover { text-decoration: none; filter: none; } #admin-ui-nav-menu li.divider { padding-top: 10px; border-bottom: 1px outset #262626; margin-bottom: 10px; } + + +/* e-overlay */ +.e-overlay { position: relative; height: 100%; } +.e-overlay .e-overlay-content { position: absolute; top: 0; left: 0; width: 100%; height: 100%; color: #FFF; opacity: 0; } +.e-overlay:hover .e-overlay-content { opacity: 1; padding-top:33%; transition: opacity .20s ease-in-out; + -moz-transition: opacity .20s ease-in-out; + -webkit-transition: opacity .20s ease-in-out; + vertical-align: middle; + background: rgba(0, 0, 0, .7); + text-align:center; + } +.e-overlay .thumbnail { margin:0; } + +.admin-ui-grid img.fallback { opacity: 0.3; } + + + + + + + + + /* TODO - use col-xx-x markup where core-mainpanel-block occurs. ? */ @media (max-width: 1700px){ .core-mainpanel-block { width:25%; }