mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-18 21:05:01 -04:00
Convert gDialog and gCancel over to g-dialog and g-cancel. Refactor CSS id's and classes in the login/reset password dialog.
This commit is contained in:
+49
-7
@@ -3,9 +3,10 @@
|
||||
*
|
||||
* Sheet organization:
|
||||
* 1) Text
|
||||
* 2) States and interactions
|
||||
* 3) Positioning and order
|
||||
* 4) Reusable containers/widgets
|
||||
* 2) Dimension and scale
|
||||
* 3) States and interactions
|
||||
* 4) Positioning and order
|
||||
* 5) Containers/widgets
|
||||
*/
|
||||
|
||||
/** *******************************************************************
|
||||
@@ -24,8 +25,16 @@
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
||||
/** *******************************************************************
|
||||
* 2) States and interactions
|
||||
* 2) Dimension and scale
|
||||
**********************************************************************/
|
||||
|
||||
.g-narrow {
|
||||
}
|
||||
|
||||
/** *******************************************************************
|
||||
* 3) States and interactions
|
||||
**********************************************************************/
|
||||
|
||||
.g-active,
|
||||
@@ -105,7 +114,7 @@ form .g-error {
|
||||
}
|
||||
|
||||
/** *******************************************************************
|
||||
* 3) Positioning and order
|
||||
* 4) Positioning and order
|
||||
**********************************************************************/
|
||||
|
||||
.g-left {
|
||||
@@ -131,10 +140,43 @@ form .g-error {
|
||||
}
|
||||
|
||||
/** *******************************************************************
|
||||
* 4) Reusable containers/widgets
|
||||
* 5) Containers/widgets
|
||||
**********************************************************************/
|
||||
|
||||
.g-dialog {
|
||||
#g-dialog {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#g-dialog .g-narrow {
|
||||
margin: 0 auto;
|
||||
width: 270px;
|
||||
}
|
||||
|
||||
#g-dialog fieldset {
|
||||
border: none;
|
||||
}
|
||||
|
||||
#g-dialog legend {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#g-dialog form input[type="text"],
|
||||
#g-dialog form input[type="password"] {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#g-dialog p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#g-dialog li {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
#g-dialog .g-cancel {
|
||||
clear: none;
|
||||
float: left;
|
||||
margin: .3em 1em;
|
||||
}
|
||||
|
||||
.g-button {
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
return this.each(function(i){
|
||||
var size;
|
||||
switch ($(this).attr("id")) {
|
||||
case "#gDialog":
|
||||
case "#g-dialog":
|
||||
case "#gPanel":
|
||||
size = "Large";
|
||||
break;
|
||||
@@ -133,7 +133,7 @@
|
||||
function() {
|
||||
if (in_progress == 0) {
|
||||
$(this).find("ul").slideDown("fast", function() { in_progress = 1; });
|
||||
$(this).find(".gDialogLink").gallery_dialog();
|
||||
$(this).find(".g-dialogLink").gallery_dialog();
|
||||
$(this).find(".gAjaxLink").gallery_ajax();
|
||||
}
|
||||
},
|
||||
|
||||
+36
-36
@@ -15,75 +15,75 @@
|
||||
|
||||
_show: function(sHref) {
|
||||
var self = this;
|
||||
var eDialog = '<div id="gDialog"></div>';
|
||||
var eDialog = '<div id="g-dialog"></div>';
|
||||
|
||||
$("body").append(eDialog);
|
||||
|
||||
if (!self.options.close) {
|
||||
self.options.close = self.close_dialog;
|
||||
}
|
||||
$("#gDialog").dialog(self.options);
|
||||
$("#g-dialog").dialog(self.options);
|
||||
|
||||
$("#gDialog").gallery_show_loading();
|
||||
$("#g-dialog").gallery_show_loading();
|
||||
|
||||
$.get(sHref, function(data) {
|
||||
$("#gDialog").html(data).gallery_show_loading();
|
||||
$("#g-dialog").html(data).gallery_show_loading();
|
||||
|
||||
if ($("#gDialog form").length) {
|
||||
self.form_loaded(null, $("#gDialog form"));
|
||||
if ($("#g-dialog form").length) {
|
||||
self.form_loaded(null, $("#g-dialog form"));
|
||||
}
|
||||
self._layout();
|
||||
|
||||
$("#gDialog").dialog("open");
|
||||
$("#g-dialog").dialog("open");
|
||||
// Remove titlebar for progress dialogs or set title
|
||||
if ($("#gDialog #gProgress").length) {
|
||||
if ($("#g-dialog #gProgress").length) {
|
||||
$(".ui-dialog-titlebar").remove();
|
||||
} else if ($("#gDialog h1").length) {
|
||||
$("#gDialog").dialog('option', 'title', $("#gDialog h1:eq(0)").html());
|
||||
} else if ($("#gDialog fieldset legend").length) {
|
||||
$("#gDialog").dialog('option', 'title', $("#gDialog fieldset legend:eq(0)").html());
|
||||
} else if ($("#g-dialog h1").length) {
|
||||
$("#g-dialog").dialog('option', 'title', $("#g-dialog h1:eq(0)").html());
|
||||
} else if ($("#g-dialog fieldset legend").length) {
|
||||
$("#g-dialog").dialog('option', 'title', $("#g-dialog fieldset legend:eq(0)").html());
|
||||
}
|
||||
|
||||
if ($("#gDialog form").length) {
|
||||
if ($("#g-dialog form").length) {
|
||||
self._ajaxify_dialog();
|
||||
}
|
||||
});
|
||||
$("#gDialog").dialog("option", "self", self);
|
||||
$("#g-dialog").dialog("option", "self", self);
|
||||
},
|
||||
|
||||
_layout: function() {
|
||||
var dialogWidth;
|
||||
var dialogHeight = $("#gDialog").height();
|
||||
var cssWidth = new String($("#gDialog form").css("width"));
|
||||
var dialogHeight = $("#g-dialog").height();
|
||||
var cssWidth = new String($("#g-dialog form").css("width"));
|
||||
var childWidth = cssWidth.replace(/[^0-9]/g,"");
|
||||
var size = $.gallery_get_viewport_size();
|
||||
if ($("#gDialog iframe").length) {
|
||||
if ($("#g-dialog iframe").length) {
|
||||
dialogWidth = size.width() - 100;
|
||||
// Set the iframe width and height
|
||||
$("#gDialog iframe").width("100%").height(size.height() - 100);
|
||||
} else if ($("#gDialog .gDialogPanel").length) {
|
||||
$("#g-dialog iframe").width("100%").height(size.height() - 100);
|
||||
} else if ($("#g-dialog .g-dialogPanel").length) {
|
||||
dialogWidth = size.width() - 100;
|
||||
$("#gDialog").dialog("option", "height", size.height() - 100);
|
||||
$("#g-dialog").dialog("option", "height", size.height() - 100);
|
||||
} else if (childWidth == "" || childWidth > 300) {
|
||||
dialogWidth = 500;
|
||||
}
|
||||
$("#gDialog").dialog('option', 'width', dialogWidth);
|
||||
$("#g-dialog").dialog('option', 'width', dialogWidth);
|
||||
},
|
||||
|
||||
form_loaded: function(event, ui) {
|
||||
// Should be defined (and localized) in the theme
|
||||
MSG_CANCEL = MSG_CANCEL || 'Cancel';
|
||||
var eCancel = '<a href="#" class="gCancel">' + MSG_CANCEL + '</a>';
|
||||
if ($("#gDialog .submit").length) {
|
||||
$("#gDialog .submit").addClass("ui-state-default ui-corner-all");
|
||||
var eCancel = '<a href="#" class="g-cancel">' + MSG_CANCEL + '</a>';
|
||||
if ($("#g-dialog .submit").length) {
|
||||
$("#g-dialog .submit").addClass("ui-state-default ui-corner-all");
|
||||
$.fn.gallery_hover_init();
|
||||
$("#gDialog .submit").parent().append(eCancel);
|
||||
$("#gDialog .gCancel").click(function(event) {
|
||||
$("#gDialog").dialog("close");
|
||||
$("#g-dialog .submit").parent().append(eCancel);
|
||||
$("#g-dialog .g-cancel").click(function(event) {
|
||||
$("#g-dialog").dialog("close");
|
||||
event.preventDefault();
|
||||
});
|
||||
}
|
||||
$("#gDialog .ui-state-default").hover(
|
||||
$("#g-dialog .ui-state-default").hover(
|
||||
function() {
|
||||
$(this).addClass("ui-state-hover");
|
||||
},
|
||||
@@ -94,23 +94,23 @@
|
||||
},
|
||||
|
||||
close_dialog: function(event, ui) {
|
||||
var self = $("#gDialog").dialog("option", "self");
|
||||
if ($("#gDialog form").length) {
|
||||
self._trigger("form_closing", null, $("#gDialog form"));
|
||||
var self = $("#g-dialog").dialog("option", "self");
|
||||
if ($("#g-dialog form").length) {
|
||||
self._trigger("form_closing", null, $("#g-dialog form"));
|
||||
}
|
||||
self._trigger("dialog_closing", null, $("#gDialog"));
|
||||
$("#gDialog").dialog("destroy").remove();
|
||||
self._trigger("dialog_closing", null, $("#g-dialog"));
|
||||
$("#g-dialog").dialog("destroy").remove();
|
||||
},
|
||||
|
||||
_ajaxify_dialog: function() {
|
||||
var self = this;
|
||||
$("#gDialog form").ajaxForm({
|
||||
$("#g-dialog form").ajaxForm({
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if (data.form) {
|
||||
$("#gDialog form").replaceWith(data.form);
|
||||
$("#g-dialog form").replaceWith(data.form);
|
||||
self._ajaxify_dialog();
|
||||
self.form_loaded(null, $("#gDialog form"));
|
||||
self.form_loaded(null, $("#g-dialog form"));
|
||||
if (typeof data.reset == 'function') {
|
||||
eval(data.reset + '()');
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ class exif_Core {
|
||||
list ($remaining) = exif::stats();
|
||||
if ($remaining) {
|
||||
site_status::warning(
|
||||
t('Your Exif index needs to be updated. <a href="%url" class="gDialogLink">Fix this now</a>',
|
||||
t('Your Exif index needs to be updated. <a href="%url" class="g-dialogLink">Fix this now</a>',
|
||||
array("url" => html::mark_clean(url::site("admin/maintenance/start/exif_task::update_index?csrf=__CSRF__")))),
|
||||
"exif_index_out_of_date");
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<a id="gExifDataLink" href="<?= url::site("exif/show/{$item->id}") ?>" title="<?= t("Photo Details")->for_html_attr() ?>"
|
||||
class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all">
|
||||
class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all">
|
||||
<span class="ui-icon ui-icon-info"></span>
|
||||
<?= t("View more information") ?>
|
||||
</a>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<a class="g-button gDialogLink ui-state-default ui-corner-all"
|
||||
<a class="g-button g-dialogLink ui-state-default ui-corner-all"
|
||||
href="<?= url::site("admin/maintenance/start/g2_import_task::import?csrf=$csrf") ?>">
|
||||
<?= t("Begin import!") ?>
|
||||
</a>
|
||||
|
||||
@@ -249,7 +249,7 @@ class graphics_Core {
|
||||
"%count of your photos are out of date. <a %attrs>Click here to fix them</a>",
|
||||
$count,
|
||||
array("attrs" => html::mark_clean(sprintf(
|
||||
'href="%s" class="gDialogLink"',
|
||||
'href="%s" class="g-dialogLink"',
|
||||
url::site("admin/maintenance/start/gallery_task::rebuild_dirty_images?csrf=__CSRF__"))))),
|
||||
"graphics_dirty");
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ class Menu_Element_Dialog extends Menu_Element {
|
||||
} else {
|
||||
$css_class = "";
|
||||
}
|
||||
return "<li><a$css_id class=\"gDialogLink $css_class\" href=\"$this->url\" " .
|
||||
return "<li><a$css_id class=\"g-dialogLink $css_class\" href=\"$this->url\" " .
|
||||
"title=\"$this->label\">$this->label</a></li>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<td> <?= html::clean($var->name) ?> </td>
|
||||
<td>
|
||||
<a href="<?= url::site("admin/advanced_settings/edit/$var->module_name/" . html::clean($var->name)) ?>"
|
||||
class="gDialogLink"
|
||||
class="g-dialogLink"
|
||||
title="<?= t("Edit %var (%module_name)", array("var" => $var->name, "module_name" => $var->module_name))->for_html_attr() ?>">
|
||||
<? if ($var->value): ?>
|
||||
<?= html::clean($var->value) ?>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?= url::site("admin/maintenance/start/$task->callback?csrf=$csrf") ?>"
|
||||
class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all">
|
||||
class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all">
|
||||
<?= t("run") ?>
|
||||
</a>
|
||||
</td>
|
||||
@@ -100,7 +100,7 @@
|
||||
<?= t("cancel") ?>
|
||||
</a>
|
||||
<? if ($task->state == "stalled"): ?>
|
||||
<a class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"
|
||||
<a class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"
|
||||
href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>">
|
||||
<?= t("resume") ?>
|
||||
</a>
|
||||
@@ -170,12 +170,12 @@
|
||||
<?= t("remove") ?>
|
||||
</a>
|
||||
<? if ($task->get_log()): ?>
|
||||
<a href="<?= url::site("admin/maintenance/show_log/$task->id?csrf=$csrf") ?>" class="gDialogLink g-button ui-state-default ui-corner-all">
|
||||
<a href="<?= url::site("admin/maintenance/show_log/$task->id?csrf=$csrf") ?>" class="g-dialogLink g-button ui-state-default ui-corner-all">
|
||||
<?= t("browse log") ?>
|
||||
</a>
|
||||
<? endif ?>
|
||||
<? else: ?>
|
||||
<a href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>" class="gDialogLink g-button" ui-state-default ui-corner-all>
|
||||
<a href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>" class="g-dialogLink g-button" ui-state-default ui-corner-all>
|
||||
<?= t("resume") ?>
|
||||
</a>
|
||||
<a href="<?= url::site("admin/maintenance/cancel/$task->id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all">
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
appendTo('body').submit().remove();
|
||||
};
|
||||
</script>
|
||||
<div id="gTaskLogDialog">
|
||||
<div id="gTaskLog-dialog">
|
||||
<h1> <?= $task->name ?> </h1>
|
||||
<div class="gTaskLog">
|
||||
<pre><?= html::purify($task->get_log()) ?></pre>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<? if (!$info->site) continue ?>
|
||||
<? if ($id == $site) continue ?>
|
||||
<div class="gBlock">
|
||||
<a href="<?= url::site("admin/themes/preview/site/$id") ?>" class="gDialogLink" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>">
|
||||
<a href="<?= url::site("admin/themes/preview/site/$id") ?>" class="g-dialogLink" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>">
|
||||
<img src="<?= url::file("themes/{$id}/thumbnail.png") ?>"
|
||||
alt="<?= html::clean_attribute($info->name) ?>" />
|
||||
<h3> <?= $info->name ?> </h3>
|
||||
@@ -68,7 +68,7 @@
|
||||
<? if (!$info->admin) continue ?>
|
||||
<? if ($id == $admin) continue ?>
|
||||
<div class="gBlock">
|
||||
<a href="<?= url::site("admin/themes/preview/admin/$id") ?>" class="gDialogLink" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>">
|
||||
<a href="<?= url::site("admin/themes/preview/admin/$id") ?>" class="g-dialogLink" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>">
|
||||
<img src="<?= url::file("themes/{$id}/thumbnail.png") ?>"
|
||||
alt="<?= html::clean_attribute($info->name) ?>" />
|
||||
<h3> <?= $info->name ?> </h3>
|
||||
|
||||
@@ -138,19 +138,19 @@
|
||||
var self = this;
|
||||
// Deal with ui.jquery bug: http://dev.jqueryui.com/ticket/4475 (target 1.8?)
|
||||
$(".sf-menu li.sfHover ul").css("z-index", 68);
|
||||
$("#gDialog").dialog("option", "zIndex", 70);
|
||||
$("#gDialog").bind("dialogopen", function(event, ui) {
|
||||
$("#gOrganize").height($("#gDialog").innerHeight() - 20);
|
||||
$("#gOrganizeMicroThumbPanel").height($("#gDialog").innerHeight() - 90);
|
||||
$("#gOrganizeTreeContainer").height($("#gDialog").innerHeight() - 59);
|
||||
$("#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);
|
||||
});
|
||||
|
||||
$("#gDialog").bind("dialogclose", function(event, ui) {
|
||||
$("#g-dialog").bind("dialogclose", function(event, ui) {
|
||||
window.location.reload();
|
||||
});
|
||||
|
||||
$("#gDialog #gOrganizeClose").click(function(event) {
|
||||
$("#gDialog").dialog("close");
|
||||
$("#g-dialog #gOrganizeClose").click(function(event) {
|
||||
$("#g-dialog").dialog("close");
|
||||
});
|
||||
|
||||
$("#gOrganizeSortColumn,#gOrganizeSortOrder").change(function(event) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
var sort_order_url = "<?= url::site("organize/sort_order/__ALBUM_ID__/__COL__/__DIR__?csrf=$csrf") ?>";
|
||||
var tree_url = "<?= url::site("organize/tree/__ALBUM_ID__") ?>";
|
||||
</script>
|
||||
<div id="gOrganize" class="gDialogPanel">
|
||||
<div id="gOrganize" class="g-dialogPanel">
|
||||
<h1 style="display:none"><?= t("Organize %name", array("name" => html::purify($album->title))) ?></h1>
|
||||
<div id="bd">
|
||||
<div class="yui-gf">
|
||||
|
||||
@@ -57,7 +57,7 @@ class search_Core {
|
||||
list ($remaining) = search::stats();
|
||||
if ($remaining) {
|
||||
site_status::warning(
|
||||
t('Your search index needs to be updated. <a href="%url" class="gDialogLink">Fix this now</a>',
|
||||
t('Your search index needs to be updated. <a href="%url" class="g-dialogLink">Fix this now</a>',
|
||||
array("url" => html::mark_clean(url::site("admin/maintenance/start/search_task::update_index?csrf=__CSRF__")))),
|
||||
"search_index_out_of_date");
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
self.run_add();
|
||||
});
|
||||
$("#gServerAddCloseButton", this.element).click(function(event) {
|
||||
$("#gDialog").dialog("close");
|
||||
$("#g-dialog").dialog("close");
|
||||
window.location.reload();
|
||||
});
|
||||
$("#gServerAddTree span.gDirectory", this.element).dblclick(function(event) {
|
||||
@@ -33,7 +33,7 @@
|
||||
$("#gServerAddTree span.gDirectory", this.element).dblclick(function(event) {
|
||||
self.open_dir(event);
|
||||
});
|
||||
$("#gDialog").bind("dialogclose", function(event, ui) {
|
||||
$("#g-dialog").bind("dialogclose", function(event, ui) {
|
||||
window.location.reload();
|
||||
});
|
||||
},
|
||||
|
||||
@@ -24,7 +24,7 @@ function closeEditInPlaceForms() {
|
||||
$("#gRenameTagForm").parent().html($("#gRenameTagForm").parent().data("revert"));
|
||||
li.height("");
|
||||
$(".gEditable", li).bind("click", editInPlace);
|
||||
$(".gDialogLink", li).gallery_dialog();
|
||||
$(".g-dialogLink", li).gallery_dialog();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<span id="gTag-<?= $tag->id ?>" class="gEditable tag-name"><?= html::clean($tag->name) ?></span>
|
||||
<span class="g-understate">(<?= $tag->count ?>)</span>
|
||||
<a href="<?= url::site("admin/tags/form_delete/$tag->id") ?>"
|
||||
class="gDialogLink delete-link g-button">
|
||||
class="g-dialogLink delete-link g-button">
|
||||
<span class="ui-icon ui-icon-trash"><?= t("Delete this tag") ?></span></a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -86,6 +86,7 @@ class group_Core {
|
||||
|
||||
static function get_add_form_admin() {
|
||||
$form = new Forge("admin/users/add_group", "", "post", array("id" => "gAddGroupForm"));
|
||||
$form->set_attr('class', "g-narrow");
|
||||
$form_group = $form->group("add_group")->label(t("Add Group"));
|
||||
$form_group->input("name")->label(t("Name"))->id("gName");
|
||||
$form_group->inputs["name"]->error_messages(
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
class user_Core {
|
||||
static function get_edit_form($user) {
|
||||
$form = new Forge("users/$user->id?_method=put", "", "post", array("id" => "gEditUserForm"));
|
||||
$form->set_attr("class", "g-narrow");
|
||||
$group = $form->group("edit_user")->label(t("Edit User: %name", array("name" => $user->name)));
|
||||
$group->input("full_name")->label(t("Full Name"))->id("gFullName")->value($user->full_name);
|
||||
self::_add_locale_dropdown($group, $user);
|
||||
@@ -66,6 +67,7 @@ class user_Core {
|
||||
|
||||
static function get_add_form_admin() {
|
||||
$form = new Forge("admin/users/add_user", "", "post", array("id" => "gAddUserForm"));
|
||||
$form->set_attr('class', "g-narrow");
|
||||
$group = $form->group("add_user")->label(t("Add User"));
|
||||
$group->input("name")->label(t("Username"))->id("gUsername")
|
||||
->error_messages("in_use", t("There is already a user with that username"));
|
||||
@@ -112,6 +114,7 @@ class user_Core {
|
||||
|
||||
static function get_login_form($url) {
|
||||
$form = new Forge($url, "", "post", array("id" => "gLoginForm"));
|
||||
$form->set_attr('class', "g-narrow");
|
||||
$group = $form->group("login")->label(t("Login"));
|
||||
$group->input("name")->label(t("Username"))->id("gUsername")->class(null);
|
||||
$group->password("password")->label(t("Password"))->id("gPassword")->class(null);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
{},
|
||||
function(data) {
|
||||
$("#group-" + group_id).html(data);
|
||||
$("#group-" + group_id + " .gDialogLink").gallery_dialog();
|
||||
$("#group-" + group_id + " .g-dialogLink").gallery_dialog();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</script>
|
||||
<div class="gBlock">
|
||||
<a href="<?= url::site("admin/users/add_user_form") ?>"
|
||||
class="gDialogLink g-button g-right ui-icon-left ui-state-default ui-corner-all"
|
||||
class="g-dialogLink g-button g-right ui-icon-left ui-state-default ui-corner-all"
|
||||
title="<?= t("Create a new user")->for_html_attr() ?>">
|
||||
<span class="ui-icon ui-icon-circle-plus"></span>
|
||||
<?= t("Add a new user") ?>
|
||||
@@ -89,7 +89,7 @@
|
||||
<span class="ui-icon ui-icon-pencil"></span><span class="gButtonText"><?= t("edit") ?></span></a>
|
||||
<? if (user::active()->id != $user->id && !$user->guest): ?>
|
||||
<a href="<?= url::site("admin/users/delete_user_form/$user->id") ?>"
|
||||
class="gDialogLink g-button ui-state-default ui-corner-all ui-icon-left">
|
||||
class="g-dialogLink g-button ui-state-default ui-corner-all ui-icon-left">
|
||||
<span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a>
|
||||
<? else: ?>
|
||||
<span title="<?= t("This user cannot be deleted")->for_html_attr() ?>"
|
||||
@@ -105,7 +105,7 @@
|
||||
|
||||
<div id="gGroupAdmin" class="gBlock">
|
||||
<a href="<?= url::site("admin/users/add_group_form") ?>"
|
||||
class="gDialogLink g-button g-right ui-icon-left ui-state-default ui-corner-all"
|
||||
class="g-dialogLink g-button g-right ui-icon-left ui-state-default ui-corner-all"
|
||||
title="<?= t("Create a new group")->for_html_attr() ?>">
|
||||
<span class="ui-icon ui-icon-circle-plus"></span>
|
||||
<?= t("Add a new group") ?>
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
<? if (!$group->special): ?>
|
||||
<a href="<?= url::site("admin/users/delete_group_form/$group->id") ?>"
|
||||
title="<?= t("Delete the %name group", array("name" => $group->name))->for_html_attr() ?>"
|
||||
class="gDialogLink g-button ui-state-default ui-corner-all">
|
||||
class="g-dialogLink g-button ui-state-default ui-corner-all">
|
||||
<span class="ui-icon ui-icon-trash"><?= t("delete") ?></span></a>
|
||||
<? else: ?>
|
||||
<a title="<?= t("This default group cannot be deleted")->for_html_attr() ?>"
|
||||
class="gDialogLink g-button ui-state-disabled ui-corner-all ui-icon-left">
|
||||
class="g-dialogLink g-button ui-state-disabled ui-corner-all ui-icon-left">
|
||||
<span class="ui-icon ui-icon-trash"><?= t("delete") ?></span></a>
|
||||
<? endif ?>
|
||||
</h4>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<?= t('Logged in as %name', array('name' => html::mark_clean(
|
||||
'<a href="' . url::site("form/edit/users/{$user->id}") .
|
||||
'" title="' . t("Edit Your Profile")->for_html_attr() .
|
||||
'" id="gUserProfileLink" class="gDialogLink">' .
|
||||
'" id="gUserProfileLink" class="g-dialogLink">' .
|
||||
html::clean($user->display_name()) . '</a>'))) ?>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<script type="text/javascript">
|
||||
$("#gLoginForm").ready(function() {
|
||||
$("#gForgotPasswordLink").click(function() {
|
||||
$("#g-login-form").ready(function() {
|
||||
$("#g-password-reset").click(function() {
|
||||
$.ajax({
|
||||
url: "<?= url::site("password/reset") ?>",
|
||||
success: function(data) {
|
||||
$("div#gLoginView").html(data);
|
||||
$("#ui-dialog-title-gDialog").html(<?= t("Reset Password")->for_js() ?>);
|
||||
$("#g-login").html(data);
|
||||
$("#ui-dialog-title-g-dialog").html(<?= t("Reset Password")->for_js() ?>);
|
||||
$(".submit").addClass("g-button ui-state-default ui-corner-all");
|
||||
$(".submit").gallery_hover_init();
|
||||
ajaxify_login_reset_form();
|
||||
@@ -16,30 +16,28 @@
|
||||
});
|
||||
|
||||
function ajaxify_login_reset_form() {
|
||||
$("#gLoginView form").ajaxForm({
|
||||
$("#g-login form").ajaxForm({
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if (data.form) {
|
||||
$("#gLoginView form").replaceWith(data.form);
|
||||
$("#g-login form").replaceWith(data.form);
|
||||
ajaxify_login_reset_form();
|
||||
}
|
||||
if (data.result == "success") {
|
||||
$("#gDialog").dialog("close");
|
||||
$("#g-dialog").dialog("close");
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<div id="gLoginView">
|
||||
<div id="g-login">
|
||||
<ul>
|
||||
<li>
|
||||
<div id="gLoginViewForm">
|
||||
<?= $form ?>
|
||||
</div>
|
||||
<li id="g-login-form">
|
||||
<?= $form ?>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" id="gForgotPasswordLink"><?= t("Forgot Your Password?") ?></a>
|
||||
<a href="#" id="g-password-reset" class="g-right g-txt-small"><?= t("Forgot Your Password?") ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<? if (empty($name)): ?>
|
||||
<a href="<?= url::site("admin/watermarks/form_add") ?>"
|
||||
title="<?= t("Upload a watermark")->for_html_attr() ?>"
|
||||
class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-document-b"></span><?= t("Upload a watermark") ?></a>
|
||||
class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-document-b"></span><?= t("Upload a watermark") ?></a>
|
||||
<? else: ?>
|
||||
<h2> <?= t("Active Watermark") ?> </h2>
|
||||
<p>
|
||||
@@ -27,10 +27,10 @@
|
||||
<div class="controls">
|
||||
<a href="<?= url::site("admin/watermarks/form_edit") ?>"
|
||||
title="<?= t("Edit Watermark")->for_html_attr() ?>"
|
||||
class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-pencil"></span><?= t("edit") ?></a>
|
||||
class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-pencil"></span><?= t("edit") ?></a>
|
||||
<a href="<?= url::site("admin/watermarks/form_delete") ?>"
|
||||
title="<?= t("Delete Watermark")->for_html_attr() ?>"
|
||||
class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a>
|
||||
class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<? endif ?>
|
||||
|
||||
@@ -67,7 +67,7 @@ h3 {
|
||||
|
||||
a,
|
||||
.gMenu a,
|
||||
#gDialog a,
|
||||
#g-dialog a,
|
||||
.g-button,
|
||||
.g-button:hover,
|
||||
.g-button:active,
|
||||
@@ -80,7 +80,7 @@ button.ui-state-hover {
|
||||
}
|
||||
|
||||
a:hover,
|
||||
#gDialog a:hover {
|
||||
#g-dialog a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@@ -88,21 +88,6 @@ a:hover,
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#gDialog .gCancel {
|
||||
clear: none;
|
||||
float: left;
|
||||
margin: .3em 1em;
|
||||
}
|
||||
|
||||
#gForgotPasswordLink {
|
||||
float: right;
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
#gDialog .gCancel {
|
||||
float: left;
|
||||
}
|
||||
|
||||
/* Tables ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
table {
|
||||
@@ -782,7 +767,7 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser {
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.gDialogLoadingLarge {
|
||||
.g-dialogLoadingLarge {
|
||||
background: url('../../../lib/images/loading-large.gif') no-repeat center center !important;
|
||||
font-size: 0;
|
||||
}
|
||||
@@ -836,34 +821,6 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
#gDialog {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#gDialog li {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
#gDialog form input[type="text"],
|
||||
#gDialog form input[type="password"] {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#gDialog #gLoginForm,
|
||||
#gDialog #gAddUserForm,
|
||||
#gDialog #gAddGroupForm {
|
||||
margin: 0 auto;
|
||||
width: 270px;
|
||||
}
|
||||
|
||||
#gDialog fieldset {
|
||||
border: none;
|
||||
}
|
||||
|
||||
#gDialog legend {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* jQuery UI ThemeRoller buttons */
|
||||
|
||||
.gButtonSet {
|
||||
@@ -1056,7 +1013,7 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#gTaskLogDialog h1 {
|
||||
#gTaskLog-dialog h1 {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
@@ -1143,7 +1100,7 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser {
|
||||
|
||||
.rtl caption,
|
||||
.rtl th,
|
||||
.rtl #gDialog {
|
||||
.rtl #g-dialog {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@@ -1159,7 +1116,7 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.rtl #gDialog .gCancel,
|
||||
.rtl #g-dialog .g-cancel,
|
||||
.rtl form ul ul li,
|
||||
.rtl input[type="submit"],
|
||||
.rtl input[type="reset"],
|
||||
|
||||
@@ -17,7 +17,7 @@ $(document).ready(function(){
|
||||
$("#gMessage li").gallery_show_message();
|
||||
|
||||
// Initialize modal dialogs
|
||||
$(".gDialogLink").gallery_dialog();
|
||||
$(".g-dialogLink").gallery_dialog();
|
||||
|
||||
// Initialize ajax links
|
||||
$(".gAjaxLink").gallery_ajax();
|
||||
|
||||
@@ -23,7 +23,7 @@ input.submit {
|
||||
width: 110px;
|
||||
}
|
||||
|
||||
#gDialog a.gCancel {
|
||||
#g-dialog a.g-cancel {
|
||||
display: inline-block !important;
|
||||
float: none !important;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ h3 {
|
||||
|
||||
a,
|
||||
.gMenu a,
|
||||
#gDialog a,
|
||||
#g-dialog a,
|
||||
.g-button,
|
||||
.g-button:hover,
|
||||
.g-button:active,
|
||||
@@ -81,7 +81,7 @@ button.ui-state-hover {
|
||||
}
|
||||
|
||||
a:hover,
|
||||
#gDialog a:hover {
|
||||
#g-dialog a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@@ -89,22 +89,7 @@ a:hover,
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#gDialog .gCancel {
|
||||
clear: none;
|
||||
float: left;
|
||||
margin: .3em 1em;
|
||||
}
|
||||
|
||||
#gForgotPasswordLink {
|
||||
float: right;
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
#gDialog .gCancel {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#gDialog #gMessage li {
|
||||
#g-dialog #gMessage li {
|
||||
width: 400px;
|
||||
white-space: normal;
|
||||
padding-left: 32px;
|
||||
@@ -685,13 +670,13 @@ form .gError,
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#gDialog ul.gBreadcrumbs {
|
||||
#g-dialog ul.gBreadcrumbs {
|
||||
clear: both;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
#gDialog .gBreadcrumbs li {
|
||||
#g-dialog .gBreadcrumbs li {
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
@@ -822,7 +807,7 @@ form .gError,
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.gDialogLoadingLarge {
|
||||
.g-dialogLoadingLarge {
|
||||
background: url('../../../lib/images/loading-large.gif') no-repeat center center !important;
|
||||
font-size: 0;
|
||||
}
|
||||
@@ -850,38 +835,6 @@ form .gError,
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
#gDialog {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#gDialog li {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
#gDialog form input[type="text"],
|
||||
#gDialog form input[type="password"] {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#gDialog #gLoginForm,
|
||||
#gDialog #gAddUserForm,
|
||||
#gDialog #gAddGroupForm {
|
||||
margin: 0 auto;
|
||||
width: 270px;
|
||||
}
|
||||
|
||||
#gDialog fieldset {
|
||||
border: none;
|
||||
}
|
||||
|
||||
#gDialog legend {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#gDialog p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* jQuery UI ThemeRoller buttons */
|
||||
|
||||
.gButtonSet {
|
||||
@@ -1097,7 +1050,7 @@ form .gError,
|
||||
|
||||
.rtl caption,
|
||||
.rtl th,
|
||||
.rtl #gDialog {
|
||||
.rtl #g-dialog {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@@ -1109,7 +1062,7 @@ form .gError,
|
||||
float: left;
|
||||
}
|
||||
|
||||
.rtl #gDialog .gCancel,
|
||||
.rtl #g-dialog .g-cancel,
|
||||
.rtl form ul ul li,
|
||||
.rtl input[type="submit"],
|
||||
.rtl input[type="reset"],
|
||||
|
||||
@@ -26,8 +26,8 @@ $(document).ready(function() {
|
||||
$("#gMessage li").gallery_show_message();
|
||||
|
||||
// Initialize dialogs
|
||||
$("#gLoginLink").addClass("gDialogLink");
|
||||
$(".gDialogLink").gallery_dialog();
|
||||
$("#gLoginLink").addClass("g-dialogLink");
|
||||
$(".g-dialogLink").gallery_dialog();
|
||||
|
||||
// Initialize view menu
|
||||
if ($("#gViewMenu").length) {
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<? if ($user->admin || access::can("add", $item)): ?>
|
||||
<? $addurl = url::file("index.php/simple_uploader/app/$item->id") ?>
|
||||
<li><?= t("There aren't any photos here yet! <a %attrs>Add some</a>.",
|
||||
array("attrs" => html::mark_clean("href=\"$addurl\" class=\"gDialogLink\""))) ?></li>
|
||||
array("attrs" => html::mark_clean("href=\"$addurl\" class=\"g-dialogLink\""))) ?></li>
|
||||
<? else: ?>
|
||||
<li><?= t("There aren't any photos here yet!") ?></li>
|
||||
<? endif; ?>
|
||||
|
||||
Reference in New Issue
Block a user