diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index 86d2d2fd3..8c3d697d0 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -456,7 +456,8 @@ class page_admin_ui extends e_admin_ui 'menu_title' => array('title'=> "Menu Title", 'nolist'=>true, 'tab' => 2, 'type' => 'text', 'inline'=>true, 'width'=>'25%', "help"=>"Caption displayed on the menu item.", 'writeParms'=>'size=xxlarge'), 'menu_text' => array('title'=> "Menu Body", 'nolist'=>true, 'tab' => 2, 'type' => 'bbarea', 'data'=>'str', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1', 'writeParms'=>'media=page' ), 'menu_template' => array('title'=> "Menu Template", 'nolist'=>true, 'tab' => 2, 'type' => 'dropdown', 'width' => 'auto','filter' => true, 'batch'=>true, 'inline'=>true, 'writeParms'=>''), - + 'menu_icon' => array('title' =>"Menu Icon/Glyph", 'nolist'=>true, 'tab' => 2, 'type' => 'icon', 'width' => '110px', 'thclass' => 'center', 'class' => "center", 'nosort' => false, 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60','writeParms'=>'media=page&glyphs=1', 'readonly'=>false), + 'menu_image' => array('title' =>"Menu Image", 'nolist'=>true, 'tab' => 2, 'type' => 'image', 'width' => '110px', 'thclass' => 'center', 'class' => "center", 'nosort' => false, 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60','writeParms'=>'media=page', 'readonly'=>false), @@ -500,14 +501,15 @@ class page_admin_ui extends e_admin_ui // 'page_author' => array('title'=> LAN_AUTHOR, 'tab' => 0, 'type' => 'user', 'data'=>'int','width' => 'auto', 'thclass' => 'left'), 'page_datestamp' => array('title'=> LAN_DATE, 'type' => 'datestamp', 'data'=>'int', 'width' => 'auto','writeParms'=>'auto=1&readonly=1'), - + 'menu_icon' => array('title'=> LAN_ICON, 'type' => 'icon', 'width' => '80px', 'thclass' => 'center', 'class' => "right", 'nosort' => false, 'readParms'=>'thumb=80&thumb_urlraw=0&thumb_aw=80', 'readonly'=>false), + 'menu_title' => array('title'=> "Menu Title", 'forced'=> TRUE, 'type' => 'text', 'inline'=>true, 'width'=>'25%'), 'menu_text' => array('title'=> "Menu Body", 'type' => 'bbarea', 'data'=>'str', 'width' => 'auto', 'readParms' => 'expand=...&truncate=50&bb=1', 'writeParms'=>'media=page'), 'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'noselector' => true, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center','readParms'=>'deleteClass=252') ); - $this->fieldpref = array("page_id","menu_name", "menu_title", "menu_text", 'menu_image', 'menu_template'); + $this->fieldpref = array("page_id","menu_name", "menu_title", "menu_text", 'menu_image', 'menu_template', 'menu_icon'); } diff --git a/e107_core/shortcodes/batch/page_shortcodes.php b/e107_core/shortcodes/batch/page_shortcodes.php index ea4681857..2023de384 100644 --- a/e107_core/shortcodes/batch/page_shortcodes.php +++ b/e107_core/shortcodes/batch/page_shortcodes.php @@ -218,7 +218,12 @@ class cpage_shortcodes extends e_shortcode } return ""; - } + } + + function sc_cmenuicon($parm='') + { + return e107::getParser()->toIcon($this->page['menu_icon']); + } function sc_cpageurl() diff --git a/e107_core/sql/core_sql.php b/e107_core/sql/core_sql.php index 93a832247..726c9f198 100644 --- a/e107_core/sql/core_sql.php +++ b/e107_core/sql/core_sql.php @@ -389,6 +389,7 @@ CREATE TABLE page ( menu_title varchar(250) NOT NULL default '', menu_text mediumtext NOT NULL, menu_image varchar(250) NOT NULL default '', + menu_icon varchar(250) NOT NULL default '', menu_template varchar(50) NOT NULL default '', PRIMARY KEY (page_id) diff --git a/e107_handlers/menu_class.php b/e107_handlers/menu_class.php index 7749fddb3..d4cd020e7 100644 --- a/e107_handlers/menu_class.php +++ b/e107_handlers/menu_class.php @@ -401,8 +401,8 @@ class e_menu $sql->select("page", "*", $query); $page = $sql->fetch(); - - $caption = $tp->toHTML($page['menu_title'], true, 'parse_sc, constants'); + $caption = (vartrue($page['menu_icon'])) ? $tp->toIcon($page['menu_icon']) : ''; + $caption .= $tp->toHTML($page['menu_title'], true, 'parse_sc, constants'); if(vartrue($page['menu_template'])) // New v2.x templates. see core/menu_template.php { diff --git a/e107_themes/bootstrap/admin_style.css b/e107_themes/bootstrap/admin_style.css index 48fe51e6a..75e830036 100644 --- a/e107_themes/bootstrap/admin_style.css +++ b/e107_themes/bootstrap/admin_style.css @@ -49,6 +49,7 @@ e-tabs fieldset { padding:0px ; padding-left:3px; border-top:0px;} td.center, th.center { text-align:center } +td.right, th.right { text-align:right } .col-label { width:25%; } diff --git a/e107_themes/bootstrap3/templates/menu_template.php b/e107_themes/bootstrap3/templates/menu_template.php index b6fa2f60d..e18507dde 100644 --- a/e107_themes/bootstrap3/templates/menu_template.php +++ b/e107_themes/bootstrap3/templates/menu_template.php @@ -21,7 +21,7 @@ $MENU_TEMPLATE['2-column_1:1_text-left']['start'] = '{SETIMAGE: w=700&h=450}'; $MENU_TEMPLATE['2-column_1:1_text-left']['body'] = ' -

{CMENUTITLE}

{CMENUBODY}
{CPAGEBUTTON}
+

{CMENUICON}{CMENUTITLE}

{CMENUBODY}
{CPAGEBUTTON}
{CMENUIMAGE}
'; $MENU_TEMPLATE['2-column_1:1_text-left']['end'] = ''; @@ -30,14 +30,14 @@ $MENU_TEMPLATE['2-column_1:1_text-right']['start'] = '{SETIMAGE: w=700&h=450}'; $MENU_TEMPLATE['2-column_1:1_text-right']['body'] = '
{CMENUIMAGE}
-

{CMENUTITLE}

{CMENUBODY}
{CPAGEBUTTON}
+

{CMENUICON}{CMENUTITLE}

{CMENUBODY}
{CPAGEBUTTON}
'; $MENU_TEMPLATE['2-column_1:1_text-right']['end'] = ''; $MENU_TEMPLATE['2-column_2:1_text-left']['start'] = ''; $MENU_TEMPLATE['2-column_2:1_text-left']['body'] = ' -

{CMENUTITLE}

{CMENUBODY}
+

{CMENUICON}{CMENUTITLE}

{CMENUBODY}
'.LAN_READ_MORE.'
diff --git a/e107_web/css/e107.css b/e107_web/css/e107.css index dad1a0549..e85317c53 100644 --- a/e107_web/css/e107.css +++ b/e107_web/css/e107.css @@ -13,33 +13,33 @@ .justify { text-align: justify } .f-left { float: left } .f-right { float: right } -.top { vertical-align: top } -.middle { vertical-align: middle } -.bottom { vertical-align: bottom } -.clear { clear: both } -.clear-l { clear: right } -.clear-r { clear: left } +.top { vertical-align: top } +.middle { vertical-align: middle } +.bottom { vertical-align: bottom } +.clear { clear: both } +.clear-l { clear: right } +.clear-r { clear: left } i.icon-download { font-size:200%; } .e-footer-info { margin-top:10px; padding:20px; text-align: center } -td.text-center { text-align:center; } +td.text-center { text-align:center; } /* Core Icons */ -.icon { border: 0 } -.icon.action { vertical-align: middle } -.S16 { width: 16px; height: 16px } -.S32 { width: 32px; height: 32px } -.S64 { width: 64px; height: 64px } -.S128 { width: 128px; height: 128px } +.icon { border: 0px; display: inline-block; margin-right: .3em;} +.icon.action { vertical-align: middle } +.S16 { width: 16px; height: 16px } +.S32 { width: 32px; height: 32px } +.S64 { width: 64px; height: 64px } +.S128 { width: 128px; height: 128px } /* Decorate JS - see core/decorate.js */ -.odd { } -.even { background-color: #F5F5F5 } -.first, .last { } -.e-list { /* core selector - can be used per theme (JS) to decorate list blocks */ } +.odd { } +.even { background-color: #F5F5F5 } +.first, .last { } +.e-list { /* core selector - can be used per theme (JS) to decorate list blocks */ } /* e107 Tabs - see core/tabs.js */ ul.e-tabs { list-style-type: none; }