From c5e60dd7f2b369509bbbff02e0222ee0268493af Mon Sep 17 00:00:00 2001 From: CaMer0n Date: Wed, 23 May 2012 13:59:12 +0000 Subject: [PATCH] General cleanup for left-side admin-menu navigation --- e107_admin/cpage.php | 35 +- e107_admin/image.php | 2 +- e107_admin/users.php | 9 +- .../jslib/{core => }/colorbox/colorbox.css | 0 .../{core => }/colorbox/images/border.png | Bin .../{core => }/colorbox/images/controls.png | Bin .../{core => }/colorbox/images/loading.gif | Bin .../colorbox/images/loading_background.png | Bin .../{core => }/colorbox/images/overlay.png | Bin .../jslib/{core => }/colorbox/index.html | 0 .../colorbox/jquery.colorbox-min.js | 0 e107_handlers/form_handler.php | 6 +- e107_plugins/release/images/e107_icon_16.png | Bin 848 -> 1033 bytes e107_plugins/release/images/e107_icon_32.png | Bin 1646 -> 2880 bytes e107_themes/_blank/admin_template.php | 46 +-- e107_themes/_blank/admin_theme.php | 65 ++-- e107_themes/jayya/admin_theme.php | 304 +----------------- 17 files changed, 86 insertions(+), 381 deletions(-) rename e107_files/jslib/{core => }/colorbox/colorbox.css (100%) rename e107_files/jslib/{core => }/colorbox/images/border.png (100%) rename e107_files/jslib/{core => }/colorbox/images/controls.png (100%) rename e107_files/jslib/{core => }/colorbox/images/loading.gif (100%) rename e107_files/jslib/{core => }/colorbox/images/loading_background.png (100%) rename e107_files/jslib/{core => }/colorbox/images/overlay.png (100%) rename e107_files/jslib/{core => }/colorbox/index.html (100%) rename e107_files/jslib/{core => }/colorbox/jquery.colorbox-min.js (100%) diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index 49e47a334..b1ea70701 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -801,9 +801,9 @@ class page_admin_ui extends e_admin_ui } -require_once('auth.php'); -new page_admin(); +new page_admin(); +require_once('auth.php'); e107::getAdminUI()->runPage(); @@ -1011,38 +1011,13 @@ class page */ } - +/* function cpage_adminmenu() { global $page; global $action; - $page->show_options($action); + // $page->show_options($action); } +*/ -/** - * Handle page DOM within the page header - * - * @return string JS source - */ -function headerjs() -{ - return; - require_once(e_HANDLER.'js_helper.php'); - $ret = " - - - "; - - return $ret; -} ?> \ No newline at end of file diff --git a/e107_admin/image.php b/e107_admin/image.php index 8be611043..66e382102 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -263,7 +263,7 @@ class media_admin_ui extends e_admin_ui protected $fields = array( 'checkboxes' => array('title'=> '', 'type' => null, 'data'=> null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'), 'media_id' => array('title'=> LAN_ID, 'type' => 'number', 'data'=> 'int', 'width' =>'5%', 'forced'=> TRUE, 'nolist'=>TRUE), - 'media_url' => array('title'=> 'Preview', 'type' => 'image', 'data'=> 'str', 'thclass' => 'center', 'class'=>'center', 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60','readonly'=>TRUE, 'writeParams' => 'path={e_MEDIA}', 'width' => '110px'), + 'media_url' => array('title'=> 'Preview', 'type' => 'image', 'data'=> 'str', 'thclass' => 'center', 'class'=>'center', 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60','readonly'=>TRUE, 'writeParms'=>'thumb=180&thumb_urlraw=0&thumb_aw=180', 'width' => '110px'), 'media_category' => array('title'=> LAN_CATEGORY, 'type' => 'method', 'data'=> 'str', 'width' => 'auto', 'filter' => true, 'batch' => true,'writeParms'=>'multiple=1'), // Upload should be managed completely separately via upload-handler. diff --git a/e107_admin/users.php b/e107_admin/users.php index f65f8c1cd..cadb92b02 100644 --- a/e107_admin/users.php +++ b/e107_admin/users.php @@ -81,12 +81,15 @@ if (isset ($_POST['updateRanks'])) updateRanks(); } $e_sub_cat = 'users'; -require_once ('auth.php'); -$user = new users; require_once (e_HANDLER.'form_handler.php'); require_once (e_HANDLER.'userclass_class.php'); include_once (e_HANDLER.'user_extended_class.php'); require_once (e_HANDLER.'validator_class.php'); +$user = new users; +require_once ('auth.php'); + + + // require_once (e_HANDLER.'user_handler.php'); // $userMethods = new UserHandler; // $colList = $userMethods->getNiceNames(TRUE); @@ -2189,7 +2192,7 @@ function users_adminmenu() { global $user; global $action; - $user->show_options($action); + $user->show_options($action); // FIXME } diff --git a/e107_files/jslib/core/colorbox/colorbox.css b/e107_files/jslib/colorbox/colorbox.css similarity index 100% rename from e107_files/jslib/core/colorbox/colorbox.css rename to e107_files/jslib/colorbox/colorbox.css diff --git a/e107_files/jslib/core/colorbox/images/border.png b/e107_files/jslib/colorbox/images/border.png similarity index 100% rename from e107_files/jslib/core/colorbox/images/border.png rename to e107_files/jslib/colorbox/images/border.png diff --git a/e107_files/jslib/core/colorbox/images/controls.png b/e107_files/jslib/colorbox/images/controls.png similarity index 100% rename from e107_files/jslib/core/colorbox/images/controls.png rename to e107_files/jslib/colorbox/images/controls.png diff --git a/e107_files/jslib/core/colorbox/images/loading.gif b/e107_files/jslib/colorbox/images/loading.gif similarity index 100% rename from e107_files/jslib/core/colorbox/images/loading.gif rename to e107_files/jslib/colorbox/images/loading.gif diff --git a/e107_files/jslib/core/colorbox/images/loading_background.png b/e107_files/jslib/colorbox/images/loading_background.png similarity index 100% rename from e107_files/jslib/core/colorbox/images/loading_background.png rename to e107_files/jslib/colorbox/images/loading_background.png diff --git a/e107_files/jslib/core/colorbox/images/overlay.png b/e107_files/jslib/colorbox/images/overlay.png similarity index 100% rename from e107_files/jslib/core/colorbox/images/overlay.png rename to e107_files/jslib/colorbox/images/overlay.png diff --git a/e107_files/jslib/core/colorbox/index.html b/e107_files/jslib/colorbox/index.html similarity index 100% rename from e107_files/jslib/core/colorbox/index.html rename to e107_files/jslib/colorbox/index.html diff --git a/e107_files/jslib/core/colorbox/jquery.colorbox-min.js b/e107_files/jslib/colorbox/jquery.colorbox-min.js similarity index 100% rename from e107_files/jslib/core/colorbox/jquery.colorbox-min.js rename to e107_files/jslib/colorbox/jquery.colorbox-min.js diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 2ad815aef..138480ea5 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -1364,7 +1364,7 @@ class e_form if(vartrue($parms['sort']))//FIXME use a global variable such as $fieldpref { - $value .= " "; + $value .= "".ADMIN_SORT_ICON." "; } $value .= "".LAN_EDIT.""; @@ -1732,6 +1732,10 @@ class e_form // Two modes of read-only. 1 = read-only, but only when there is a value, 2 = read-only regardless. if(vartrue($attributes['readonly']) && (vartrue($value) || vartrue($attributes['readonly'])==2)) // quick fix (maybe 'noedit'=>'readonly'?) { + if(vartrue($attributes['writeParms'])) // eg. different size thumbnail on the edit page. + { + $attributes['readParms'] = $attributes['writeParms']; + } return $this->renderValue($key, $value, $attributes).$this->hidden($key, $value); // } diff --git a/e107_plugins/release/images/e107_icon_16.png b/e107_plugins/release/images/e107_icon_16.png index 257b205f5fddc74911aadf5811b368965961072d..c87816603bc392b1b2836d2a178e6a195c4c9f48 100644 GIT binary patch delta 1012 zcmVHp z23LdGaGJ~trMz5}KwZt%R9;4C#7hHKh|Q?BUS=*!*<@sYg!M<(rW;uX;h4=0?oBiS z#`Ay`1r&}$s~}mm2QX^j844^M-6Nscm)VxMSO%r&6w5#g zOTmj-98gem2`I@5{DXOjvJBE0n&^PMtJ5d=*}1SV8$^i-#?oxPzUsG`{qshLa&92#@vloU95OHsFXM58V z%z^PS|F|i`sa+YL1WJ4209cI-v$PbhP!R4i*c1HAIDf7#RX}&0X|}bZz*)AH6yE;g zwT>ZLkGQ2gmv<%39Jo0#IbOISU8S-b>)s6`jISqb=~*BPeHP+ zA&H}(4}Z)XJ9ct&oW~_J=@fnDmymkuR7p{K+OCRTeqX&Bh=fa#qvl&F1ll);D+*|Z z!3U3D4U~didJc%WRk!T(hXohxy0za`kQ?7NV`e_<-&}l|JYIN)dZk^F2`;6Lv>aT- z@$d8x{LrS-@DXRv<-_oEEOuce@IhW~#KROwPz*HOzFW zzL6lZzi<|aGlMKnPd}|#l8-IqJ$X`}VAp6_t^?SysS|`pX_)!31r~g#(bV;aV4r^( z?)=utXF3PNOA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$O0pdTzcFh0+h-?Qy0XGmU12L$ceE`HH_YDC8h;g91 c=Kui)0Ku0)z;?REIsgCw07*qoM6N<$f*S~ + diff --git a/e107_themes/_blank/admin_theme.php b/e107_themes/_blank/admin_theme.php index 496a5878a..2b012455f 100644 --- a/e107_themes/_blank/admin_theme.php +++ b/e107_themes/_blank/admin_theme.php @@ -5,11 +5,32 @@ define('STANDARDS_MODE', TRUE); include_lan(e_THEME."_blank/languages/".e_LANGUAGE.".php"); -//temporary fixed - awaiting theme.xml addition -e107::getJs()->requireCoreLib(array( - 'core/decorate.js' => 2, - 'core/tabs.js' => 2 -)); +// jQUERY scripts + +e107::js('core', 'colorbox/jquery.colorbox-min.js', 'jquery', 2); +e107::css('core', 'colorbox/colorbox.css', 'jquery'); + +e107::js('core', 'core/jquery.elastic.source.js', 'jquery', 2); + +e107::js('core', 'plupload/plupload.full.js', 'jquery', 2); +e107::css('core', 'plupload/jquery.plupload.queue/css/jquery.plupload.queue.css', 'jquery'); +e107::js('core', 'plupload/jquery.plupload.queue/jquery.plupload.queue.js', 'jquery', 2); + +e107::css('core', 'chosen/chosen.css', 'jquery'); +e107::js('core', 'chosen/chosen.jquery.min.js', 'jquery', 2); + +e107::css('core', 'password/style.css', 'jquery'); +e107::js('core', 'password/jquery.pwdMeter.js', 'jquery', 2); +// +e107::js("core", "plupload/customUpload.js","jquery",3); + +e107::js("core", "core/mediaManager.js","jquery",3); + +e107::css('core', 'core/admin.css', 'jquery'); +e107::js('core', 'core/admin.jquery.js', 'jquery', 4); + + + $register_sc[]='FS_ADMIN_ALT_NAV'; $no_core_css = TRUE; @@ -71,6 +92,8 @@ $no_core_css = TRUE; define("ADMIN_EXECUTE_ICON", ""); define("ADMIN_EXECUTE_ICON_PATH", e_IMAGE."admin_images/execute_32.png"); + define("ADMIN_SORT_ICON", ""); + define("ADMIN_SORT_ICON_PATH", e_IMAGE."admin_images/sort_32.png"); function theme_head() { @@ -94,38 +117,6 @@ function theme_head() { '; - - - $ret .= " - "; return $ret; } diff --git a/e107_themes/jayya/admin_theme.php b/e107_themes/jayya/admin_theme.php index d133c4eaa..fa004fc61 100644 --- a/e107_themes/jayya/admin_theme.php +++ b/e107_themes/jayya/admin_theme.php @@ -95,306 +95,30 @@ e107::css('inline',"/******** Tabs JS */ // jQUERY scripts -e107::js('core', 'core/colorbox/jquery.colorbox-min.js', 'jquery', 2); -e107::css('core', 'core/colorbox/colorbox.css', 'jquery'); -e107::js('core', 'core/jquery.elastic.source.js', 'jquery', 2); +e107::js('core', 'colorbox/jquery.colorbox-min.js', 'jquery', 2); +e107::css('core', 'colorbox/colorbox.css', 'jquery'); -// e107::js('url', 'http://bp.yahooapis.com/2.4.21/browserplus-min.js', 'jquery', 2); +e107::js('core', 'core/jquery.elastic.source.js', 'jquery', 2); -//e107::css('core', 'plupload/jquery.ui.plupload/css/jquery.ui.plupload.css', 'jquery'); +e107::js('core', 'plupload/plupload.full.js', 'jquery', 2); +e107::css('core', 'plupload/jquery.plupload.queue/css/jquery.plupload.queue.css', 'jquery'); +e107::js('core', 'plupload/jquery.plupload.queue/jquery.plupload.queue.js', 'jquery', 2); +e107::css('core', 'chosen/chosen.css', 'jquery'); +e107::js('core', 'chosen/chosen.jquery.min.js', 'jquery', 2); -e107::js('core', 'plupload/plupload.full.js', 'jquery', 2); -//e107::js('core', 'plupload/jquery.ui.plupload/jquery.ui.plupload.js','jquery',2); - -e107::css('core', 'plupload/jquery.plupload.queue/css/jquery.plupload.queue.css', 'jquery'); -e107::js('core', 'plupload/jquery.plupload.queue/jquery.plupload.queue.js', 'jquery', 2); - -e107::css('core', 'chosen/chosen.css', 'jquery'); -e107::js('core', 'chosen/chosen.jquery.min.js', 'jquery', 2); - -e107::css('core', 'password/style.css', 'jquery'); -e107::js('core', 'password/jquery.pwdMeter.js', 'jquery', 2); +e107::css('core', 'password/style.css', 'jquery'); +e107::js('core', 'password/jquery.pwdMeter.js', 'jquery', 2); // +e107::js("core", "plupload/customUpload.js","jquery",3); +e107::js("core", "core/mediaManager.js","jquery",3); +e107::css('core', 'core/admin.css', 'jquery'); +e107::js('core', 'core/admin.jquery.js', 'jquery', 4); - - - - - - - -e107::js('inline',' - - $(document).ready(function() - { - $(".e-hideme").hide(); - $(".e-expandit").show(); - - $(".e-expandit").click(function () { - var id = $(this).attr("href"); - $(id).toggle("slow"); - }); - - // Date - $(function() { - $( ".e-date" ).datepicker(); - }); - - // Tabs - $(function() { - $( "#tab-container" ).tabs(); - }); - - // Tabs - $(function() { - $( ".e-tabs" ).tabs(); - }); - - $(".e-multiselect").chosen(); - - - // Password - $(function() { - - $("#password1").pwdMeter({ - minLength: 6, - displayGeneratePassword: true, - generatePassText: "Generate", - randomPassLength: 12 - }); - - }); - - // Decorate - $(".adminlist tr:even").addClass("even"); - $(".adminlist tr:odd").addClass("odd"); - $(".adminlist tr:first").addClass("first"); - $(".adminlist tr:last").addClass("last"); - - // Character Counter - $("textarea").before("

     

    "); - $("textarea").keyup(function(){ - - // var max=$(this).attr("maxlength"); - var max = 100; - var el = "#" + $(this).attr("name") + "-remainingCharacters"; - var valLen=$(this).val().length; - $(el).text( valLen + " characters") - }); - - // Text-area AutoGrow - $("textarea.e-autoheight").elastic(); - - // Dialog - $("a.e-dialog").colorbox({ - iframe:true, - width:"60%", - height:"65%", - speed:100 - }); - - $(".e-dialog-close").click(function () { - parent.$.colorbox.close() - }); - - - // Modal Box - uses inline hidden content - $(".e-modal").click(function () { - var id = $(this).attr("href"); - $(id).dialog({ - minWidth: 800, - maxHeight: 700, - modal: true - }); - }); - - // Modal Box - uses inline hidden content // NEEDS work - see customize link for admin-infopanel. - - $(".e-modal-iframe").click(function (e) { - var id = $(this).attr("href"); - e.preventDefault(); - var page = $(this).attr("href") - var pagetitle = $(this).attr("title") - var $dialog = $("
    ") - .html("") - .dialog({ - autoOpen: false, - modal: true, - width:800, - height: 700, - minWidth: 800, - minHeight: 700, - maxHeight: 700, - title: pagetitle - }); - $dialog.dialog("open"); - }); - - - // Admin Prefs Navigation - - $(".plugin-navigation a").click(function () { - $(".plugin-navigation a").each(function(index) { - var ot = $(this).attr("href"); - $(ot).hide(); - $(this).closest("li").removeClass("active"); - $(this).switchClass( "link-active", "link", 0 ); - }); - var id = $(this).attr("href"); - $(this).switchClass( "link", "link-active", 30 ); - $(this).closest("li").addClass("active"); - $(id).show({ - effect: "slide" - }); - }); - - - - - - - // Sorting - var fixHelper = function(e, ui) { - ui.closest("tr").switchClass( "odd", "highlight-odd", 0 ); - ui.closest("tr").switchClass( "even", "highlight-even", 0 ); - ui.children().each(function() { - $(this).width($(this).width()); - // $(this).closest("tr").switchClass( "odd", "highlight-odd", 0 ); - // $(this).closest("tr").switchClass( "even", "highlight-even", 0 ); - }); - return ui; - }; - - $("#e-sort").sortable({ - helper: fixHelper, - cursor: "move", - opacity: 0.9, - handle: ".e-sort", - distance: 20, - containment: "parent", - stop: function(e,ui) { - var allItems = $(this).sortable("toArray"); - var newSortValue = allItems.indexOf( $(ui.item).attr("id") ); - // alert($(ui.item).attr("id") + " was moved to index " + newSortValue); - $(".highlight-even").switchClass( "highlight-even", "even", 600 ); - $(".highlight-odd").switchClass( "highlight-odd", "odd", 600 ); - }, - - update: function(event, ui) { - var allItems = $(this).sortable("toArray"); - // console.log(allItems); - var neworder = allItems.indexOf( $(ui.item).attr("id") ); - var linkid = $(ui.item).attr("id"); - // $("td").removeClass("e-moving","slow"); - - var script = $(".e-sort:first").attr("href"); - // alert(script); - $.ajax({ - type: "POST", - url: script, - data: { all: allItems, linkid: linkid, neworder: neworder } - // data: { linkid: linkid, neworder: neworder } - }).done(function( msg ) { - - // alert("Posted: "+allItems+" Updated: "+ msg ); - }); - - } - - }).disableSelection(); - - - - // Check-All - $("input.toggle-all").click(function(evt){ - if($(this).is(":checked")){ - $("input[type=\"checkbox\"].checkbox").attr("checked", "checked"); - } - else{ - $("input[type=\"checkbox\"].checkbox").removeAttr("checked"); - } - }); - - // highlight checked row - $(".adminlist input[type=\"checkbox\"].checkbox").click(function(evt){ - - if(this.checked) - { - $(this).closest("tr").switchClass( "odd", "highlight-odd", 0 ); - $(this).closest("tr").switchClass( "even", "highlight-even", 0 ); - } - else - { - $(this).closest("tr").switchClass( "highlight-even", "even", 300 ); - $(this).closest("tr").switchClass( "highlight-odd", "odd", 300 ); - } - - }); - - - - - // Basic Delete Confirmation - $("input.delete").click(function(){ - var answer = confirm($(this).attr("title")+ " ?"); - return answer // answer is a boolean - }); - - - $(".e-dialog-close").click(function () { - parent.$.colorbox.close() - }); - - - - - - - - - - - -}) - // BC Expandit() function - - function expandit(e) { - - var href = $(e).attr("href"); - - if(href === "#" || href == "") - { - idt = $(e).next("div"); - $(idt).toggle("slow"); - return false;; - } - - var id = "#" + e; - $(id).toggle("slow"); - return false; - }; - - - - -','jquery'); - -e107::js("core","plupload/customUpload.js","jquery",3); -e107::js("core","core/mediaManager.js","jquery",3); - -e107::css('inline'," - .e-moving { background-color:silver; } - tr.highlight-even { background-color:silver; } - tr.highlight-odd { background-color:silver; } - legend { display: none; } -",'jquery'); - - // [layout] $layout = "_default";