From 3e6ba7acc3291f2268cbe9c9bef0a492b557babb Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sun, 4 Oct 2009 00:27:22 -0600 Subject: Renamed most, if not all css selectors from gName to g-name. Moved a few shared images from wind to lib. Deleted unused images in the admin_wind. This will likely break a few ajax features. --- modules/organize/css/organize.css | 50 ++++++------- modules/organize/helpers/organize_event.php | 4 +- modules/organize/js/organize.js | 84 +++++++++++----------- modules/organize/views/organize_dialog.html.php | 28 ++++---- .../organize/views/organize_thumb_grid.html.php | 10 +-- modules/organize/views/organize_tree.html.php | 8 +-- 6 files changed, 92 insertions(+), 92 deletions(-) (limited to 'modules/organize') diff --git a/modules/organize/css/organize.css b/modules/organize/css/organize.css index b1cef33c..fbf3c383 100644 --- a/modules/organize/css/organize.css +++ b/modules/organize/css/organize.css @@ -2,33 +2,33 @@ /******************************************************************* * Dialog wide styles */ -#gOrganize { +#g-organize { overflow: hidden; } -#gOrganize #bd { +#g-organize #bd { height: 100%; } -#gOrganize .yui-u { +#g-organize .yui-u { width: 75%; } -#gOrganize .yui-gf .first { +#g-organize .yui-gf .first { width: 25%; } -#gMessage { +#g-action-status { margin-bottom: .4em; width: 75%; white-space: nowrap; } -#gOrganizeDetail { +#g-organizeDetail { height: 100%; } -#gMessage .gInfo { +#g-action-status .g-info { font-weight: bold; padding-left: 2em; } @@ -36,42 +36,42 @@ /******************************************************************* * Album Tree styles */ -#gOrganizeTreeContainer { +#g-organizeTreeContainer { height: 100%; overflow: auto; margin: 0 !important; padding: 0 !important; } -#gOrganizeAlbumTree .selected { +#g-organize-albumTree .selected { background-color: #cfdeff; border-bottom: 1px solid #999; margin-right: 0px; } -#gOrganizeAlbumTree ul li { +#g-organize-albumTree ul li { padding-left: 1.2em; } -.gOrganizeAlbum span { +.g-organize-album span { cursor: pointer; } -.gOrganizeAlbumText { +.g-organize-album-text { cursor: pointer; width: auto; margin: 2px 0px 1px 2px; display: block; } -.gOrganizeAlbumText:hover { +.g-organize-album-text:hover { background: #eee; } /******************************************************************* * Album panel styles */ -#gOrganizeMicroThumbPanel { +#g-organize-microthumb-panel { margin: 0 !important; padding: 0 !important; background-color: #cfdeff; @@ -82,11 +82,11 @@ overflow-y: auto; } -#gOrganizeMicroThumbGrid { +#g-organize-microthumb-grid { padding: 1em; } -.gOrganizeMicroThumbGridCell { +.g-organize-microthumb-grid-cell { float: left; font-size: 0.8em; padding: .5em !important; @@ -95,15 +95,15 @@ margin: 4px; } -.gOrganizeMicroThumb { +.g-organize-microthumb { display: block; height: 9em; text-align: center; width: 9em; } -.gOrganizeMicroThumbGridCell.ui-selecting, -.gOrganizeMicroThumbGridCell.ui-selected { +.g-organize-microthumb-grid-cell.ui-selecting, +.g-organize-microthumb-grid-cell.ui-selected { margin: 2px; border: 2px solid #13A; } @@ -115,15 +115,15 @@ background: #13A; } -.gThumbnail { +.g-thumbnail { padding: .5em; } -#gOrganizeMicroThumbGrid .gAlbum { +#g-organize-microthumb-grid .g-album { background-color: #e8e8e8; } -.gOrganizeMicroThumbGridCell:hover { +.g-organize-microthumb-grid-cell:hover { margin: 2px; border: 2px solid #13A; } @@ -131,18 +131,18 @@ /**************************************************************** * Controls styles */ -#gOrganizeControls { +#g-organizeControls { padding-left: 8px; background-color: #13A; color: #ccc; width: 100% !important; } -#gOrganizeControls select { +#g-organizeControls select { display: inline; } -#gOrganizeClose { +#g-organizeClose { float: right; margin-right: 12px; } diff --git a/modules/organize/helpers/organize_event.php b/modules/organize/helpers/organize_event.php index d6043116..a33b2f2e 100644 --- a/modules/organize/helpers/organize_event.php +++ b/modules/organize/helpers/organize_event.php @@ -26,7 +26,7 @@ class organize_event_Core { ->append(Menu::factory("dialog") ->id("organize") ->label(t("Organize Album")) - ->css_id("gOrganizeLink") + ->css_id("g-organize-link") ->url(url::site("organize/dialog/{$item->id}"))); } } @@ -37,7 +37,7 @@ class organize_event_Core { ->append(Menu::factory("dialog") ->id("organize") ->label(t("Organize album")) - ->css_id("gOrganizeLink") + ->css_id("g-organize-link") ->css_class("ui-icon-folder-open") ->url(url::site("organize/dialog/{$item->id}"))); } diff --git a/modules/organize/js/organize.js b/modules/organize/js/organize.js index bee42a22..960d75e2 100644 --- a/modules/organize/js/organize.js +++ b/modules/organize/js/organize.js @@ -4,11 +4,11 @@ handle: ".ui-selected", distance: 10, cursorAt: { left: -10, top: -10}, - appendTo: "#gOrganizeMicroThumbPanel", + appendTo: "#g-organize-microthumb-panel", helper: function(event, ui) { var selected = $(".ui-draggable.ui-selected img"); if (selected.length) { - var set = $('
') + var set = $('
') .css({ zIndex: 2000, width: 80, @@ -37,16 +37,16 @@ }, start: function(event, ui) { - $("#gOrganizeMicroThumbPanel .ui-selected").hide(); + $("#g-organize-microthumb-panel .ui-selected").hide(); }, drag: function(event, ui) { - var top = $("#gOrganizeMicroThumbPanel").offset().top; - var height = $("#gOrganizeMicroThumbPanel").height(); + var top = $("#g-organize-microthumb-panel").offset().top; + var height = $("#g-organize-microthumb-panel").height(); if (ui.offset.top > height + top - 20) { - $("#gOrganizeMicroThumbPanel").get(0).scrollTop += 100; + $("#g-organize-microthumb-panel").get(0).scrollTop += 100; } else if (ui.offset.top < top + 20) { - $("#gOrganizeMicroThumbPanel").get(0).scrollTop = Math.max(0, $("#gOrganizeMicroThumbPanel").get(0).scrollTop - 100); + $("#g-organize-microthumb-panel").get(0).scrollTop = Math.max(0, $("#g-organize-microthumb-panel").get(0).scrollTop - 100); } } }, @@ -63,7 +63,7 @@ target_id = $(".currentDropTarget").attr("ref"); } else { before_or_after = "after"; - target_id = $("#gOrganizeMicroThumbGrid li:last").attr("ref"); + target_id = $("#g-organize-microthumb-grid li:last").attr("ref"); } $.organize.do_drop({ url: rearrange_url @@ -79,9 +79,9 @@ tolerance: "pointer", greedy: true, drop: function(event, ui) { - if ($(event.target).hasClass("gViewOnly")) { + if ($(event.target).hasClass("g-view-only")) { $(".ui-selected").show(); - $(".gOrganizeMicroThumbGridCell").css("borderStyle", "none"); + $(".g-organize-microthumb-grid-cell").css("borderStyle", "none"); } else { $.organize.do_drop({ url: move_url.replace("__ALBUM_ID__", $(event.target).attr("ref")), @@ -92,7 +92,7 @@ }, do_drop: function(options) { - $("#gOrganizeMicroThumbPanel").selectable("destroy"); + $("#g-organize-microthumb-panel").selectable("destroy"); var source_ids = []; $(options.source).each(function(i) { source_ids.push($(this).attr("ref")); @@ -110,19 +110,19 @@ _refresh: function(data) { if (data.tree) { - $("#gOrganizeAlbumTree").html(data.tree); + $("#g-organize-albumTree").html(data.tree); } if (data.grid) { - $("#gOrganizeMicroThumbGrid").html(data.grid); - $("#gOrganizeSortColumn").attr("value", data.sort_column); - $("#gOrganizeSortOrder").attr("value", data.sort_order); + $("#g-organize-microthumb-grid").html(data.grid); + $("#g-organize-sort-column").attr("value", data.sort_column); + $("#g-organize-sort-order").attr("value", data.sort_order); } $.organize.set_handlers(); }, mouse_move_handler: function(event) { - if ($(".gDragHelper").length) { - $(".gOrganizeMicroThumbGridCell").css({borderStyle: "hidden", margin: "4px"}); + if ($(".g-drag-helper").length) { + $(".g-organize-microthumb-grid-cell").css({borderStyle: "hidden", margin: "4px"}); $(".currentDropTarget").removeClass("currentDropTarget"); var borderStyle = event.pageX < $(this).offset().left + $(this).width() / 2 ? {borderLeftStyle: "solid", marginLeft: "2px"} : {borderRightStyle: "solid", marginRight: "2px"}; @@ -140,37 +140,37 @@ $(".sf-menu li.sfHover ul").css("z-index", 68); $("#g-dialog").dialog("option", "zIndex", 70); $("#g-dialog").bind("dialogopen", function(event, ui) { - $("#gOrganize").height($("#g-dialog").innerHeight() - 20); - $("#gOrganizeMicroThumbPanel").height($("#g-dialog").innerHeight() - 90); - $("#gOrganizeTreeContainer").height($("#g-dialog").innerHeight() - 59); + $("#g-organize").height($("#g-dialog").innerHeight() - 20); + $("#g-organize-microthumb-panel").height($("#g-dialog").innerHeight() - 90); + $("#g-organizeTreeContainer").height($("#g-dialog").innerHeight() - 59); }); $("#g-dialog").bind("dialogclose", function(event, ui) { window.location.reload(); }); - $("#g-dialog #gOrganizeClose").click(function(event) { + $("#g-dialog #g-organizeClose").click(function(event) { $("#g-dialog").dialog("close"); }); - $("#gOrganizeSortColumn,#gOrganizeSortOrder").change(function(event) { - $.organize.resort($("#gOrganizeSortColumn").attr("value"), $("#gOrganizeSortOrder").attr("value")); + $("#g-organize-sort-column,#g-organize-sort-order").change(function(event) { + $.organize.resort($("#g-organize-sort-column").attr("value"), $("#g-organize-sort-order").attr("value")); }); $.organize.set_handlers(); }, set_handlers: function() { - $("#gOrganizeMicroThumbPanel") - .selectable({filter: ".gOrganizeMicroThumbGridCell"}) + $("#g-organize-microthumb-panel") + .selectable({filter: ".g-organize-microthumb-grid-cell"}) .droppable($.organize.content_droppable); - $(".gOrganizeMicroThumbGridCell") + $(".g-organize-microthumb-grid-cell") .draggable($.organize.micro_thumb_draggable) .mouseleave($.organize.mouse_leave_handler) .mousemove($.organize.mouse_move_handler); - $(".gOrganizeAlbum").droppable($.organize.branch_droppable); - $(".gOrganizeAlbumText").click($.organize.show_album); - $("#gOrganizeAlbumTree .ui-icon-plus,#gOrganizeAlbumTree .ui-icon-minus").click($.organize.toggle_branch); + $(".g-organize-album").droppable($.organize.branch_droppable); + $(".g-organize-album-text").click($.organize.show_album); + $("#g-organize-albumTree .ui-icon-plus,#g-organize-albumTree .ui-icon-minus").click($.organize.toggle_branch); }, toggle_branch: function(event) { @@ -207,20 +207,20 @@ if ($(event.currentTarget).hasClass("selected")) { return; } - var parent = $(event.currentTarget).parents(".gOrganizeBranch"); - if ($(parent).hasClass("gViewOnly")) { + var parent = $(event.currentTarget).parents(".g-organizeBranch"); + if ($(parent).hasClass("g-view-only")) { return; } - $("#gOrganizeMicroThumbPanel").selectable("destroy"); + $("#g-organize-microthumb-panel").selectable("destroy"); var id = $(event.currentTarget).attr("ref"); - $("#gOrganizeAlbumTree .selected").removeClass("selected"); - $(".gOrganizeAlbumText[ref=" + id + "]").addClass("selected"); - var url = $("#gOrganizeMicroThumbPanel").attr("ref").replace("__ITEM_ID__", id).replace("__OFFSET__", 0); + $("#g-organize-albumTree .selected").removeClass("selected"); + $(".g-organize-album-text[ref=" + id + "]").addClass("selected"); + var url = $("#g-organize-microthumb-panel").attr("ref").replace("__ITEM_ID__", id).replace("__OFFSET__", 0); $.get(url, {}, function(data) { - $("#gOrganizeMicroThumbGrid").html(data.grid); - $("#gOrganizeSortColumn").attr("value", data.sort_column); - $("#gOrganizeSortOrder").attr("value", data.sort_order); + $("#g-organize-microthumb-grid").html(data.grid); + $("#g-organize-sort-column").attr("value", data.sort_column); + $("#g-organize-sort-order").attr("value", data.sort_order); $.organize.set_handlers(); }, "json"); @@ -231,14 +231,14 @@ */ resort: function(column, dir) { var url = sort_order_url - .replace("__ALBUM_ID__", $("#gOrganizeAlbumTree .selected").attr("ref")) + .replace("__ALBUM_ID__", $("#g-organize-albumTree .selected").attr("ref")) .replace("__COL__", column) .replace("__DIR__", dir); $.get(url, {}, function(data) { - $("#gOrganizeMicroThumbGrid").html(data.grid); - $("#gOrganizeSortColumn").attr("value", data.sort_column); - $("#gOrganizeSortOrder").attr("value", data.sort_order); + $("#g-organize-microthumb-grid").html(data.grid); + $("#g-organize-sort-column").attr("value", data.sort_column); + $("#g-organize-sort-order").attr("value", data.sort_order); $.organize.set_handlers(); }, "json"); diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index 09720fe4..858c794c 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -5,37 +5,37 @@ var sort_order_url = ""; var tree_url = ""; -
+

html::purify($album->title))) ?>

-
-
+
+
-
-
-
    +
    +
    +
    -
    -
    +
    "> -
      +
    -
    - +
    - "gOrganizeSortColumn"), album::get_sort_order_options(), $album->sort_column) ?> - "gOrganizeSortOrder"), array("ASC" => "Ascending", "DESC" => "Descending"), $album->sort_order) ?> + "g-organize-sort-column"), album::get_sort_order_options(), $album->sort_column) ?> + "g-organize-sort-order"), array("ASC" => "Ascending", "DESC" => "Descending"), $album->sort_order) ?>
    @@ -44,5 +44,5 @@
    diff --git a/modules/organize/views/organize_thumb_grid.html.php b/modules/organize/views/organize_thumb_grid.html.php index af7136fc..553fc493 100644 --- a/modules/organize/views/organize_thumb_grid.html.php +++ b/modules/organize/views/organize_thumb_grid.html.php @@ -1,9 +1,9 @@ children(25, $offset) as $child): ?> -
  • -
    "> - thumb_img(array("class" => "gThumbnail", "ref" => $child->id), 90, true) ?> +
  • +
    "> + thumb_img(array("class" => "g-thumbnail", "ref" => $child->id), 90, true) ?>
  • @@ -14,7 +14,7 @@ $.get("id/" . ($offset + 25)) ?>", {}, function(data) { - $("#gOrganizeMicroThumbGrid").append(data.grid); + $("#g-organize-microthumb-grid").append(data.grid); $.organize.set_handlers(); }, "json"); diff --git a/modules/organize/views/organize_tree.html.php b/modules/organize/views/organize_tree.html.php index e5d91c04..924a1bd6 100644 --- a/modules/organize/views/organize_tree.html.php +++ b/modules/organize/views/organize_tree.html.php @@ -1,9 +1,9 @@ -
  • " +
  • " ref="id ?>"> - " + " ref="id ?>"> title) ?> @@ -12,11 +12,11 @@ contains($selected)): ?> $selected, "album" => $child)); ?> -
  • " +
  • " ref="id ?>"> - + title) ?>
  • -- cgit v1.2.3