diff options
author | Chad Kieffer <chad@2tbsp.com> | 2008-12-01 01:55:50 +0000 |
---|---|---|
committer | Chad Kieffer <chad@2tbsp.com> | 2008-12-01 01:55:50 +0000 |
commit | 26a512c3522b4f59a06f5e3146df5d466373c06e (patch) | |
tree | c844a59a2f0fc20d43791fffa6854bd9c7ee0fb1 /modules | |
parent | 6b03b798f3be23c83d0587f180341929c49af886 (diff) |
Grouped inline form styles. No longer using gInline class in favor of specific form IDs that can be styled differently depending on which container they appear. Added gDescription class, dropped gUnderState for semantics. CSS cleanup.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/tag/helpers/tag.php | 2 | ||||
-rw-r--r-- | modules/tag/js/tag.js | 6 | ||||
-rw-r--r-- | modules/user/js/user.js | 25 | ||||
-rw-r--r-- | modules/user/views/login.html.php | 2 |
4 files changed, 18 insertions, 17 deletions
diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php index fd683bc1..595f4b08 100644 --- a/modules/tag/helpers/tag.php +++ b/modules/tag/helpers/tag.php @@ -80,7 +80,7 @@ class tag_Core { } public static function get_add_form($item_id) { - $form = new Forge(url::site("tags"), "", "post"); + $form = new Forge(url::site("tags"), "", "post", array("id" => "gAddTagForm")); $group = $form->group(_("Add Tag")); $group->input("tag_name"); $group->hidden("item_id")->value($item_id); diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js index 98643c2d..74e48998 100644 --- a/modules/tag/js/tag.js +++ b/modules/tag/js/tag.js @@ -3,14 +3,14 @@ $("document").ready(function() { }); function ajaxify_tag_form() { - $("#gTag form").ajaxForm({ + $("#gAddTagForm").ajaxForm({ complete: function(xhr, statusText) { - $("#gTag form").replaceWith(xhr.responseText); + $("#gAddTagForm").replaceWith(xhr.responseText); if (xhr.status == 201) { $.get($("#gTagCloud").attr("src"), function(data, textStatus) { $("#gTagCloud").html(data); }); - $("#gTag form").clearForm(); + $("#gAddTagForm").clearForm(); } ajaxify_tag_form(); } diff --git a/modules/user/js/user.js b/modules/user/js/user.js index c547e511..fe7adf77 100644 --- a/modules/user/js/user.js +++ b/modules/user/js/user.js @@ -4,19 +4,20 @@ */ $("document").ready(function() { - $("#gLoginLink").click(function(event){ + $("#gLoginLink").click(function(event) { var url = $("#gLoginLink a").attr("href"); $.get(url, function(data) { - $('#gLoginLink').hide(); - $("#gLoginMenu").append('<li><a href="#">X</a></li>'); - $("#gLoginMenu li:last").addClass("gClose").show(); - $("#gLoginMenu .gClose a").click(function(){ - $("#gLoginForm").remove(); - $("#gLoginMenu .gClose").remove(); - $("#gLoginLink").show(); - $("input#gUsername").val(""); - $("input#gPassword").val(""); - }); + $('#gLoginLink').hide(); + $("#gLoginMenu").append('<li><a href="#">X</a></li>'); + $("#gLoginMenu li:last").addClass("gClose").show(); + $("#gLoginMenu .gClose a").click(function() { + $("#gLoginForm").remove(); + $("#gLoginMenu .gClose").remove(); + $("#gLoginFormContainer").hide(); + $("#gLoginLink").show(); + $("input#gUsername").val(""); + $("input#gPassword").val(""); + }); $("#gLoginFormContainer").html(data).hide().fadeIn(); ajaxify_login_form(); }); @@ -25,7 +26,7 @@ $("document").ready(function() { }); function ajaxify_login_form() { - $("form#gLoginForm").ajaxForm({ + $("#gLoginForm").ajaxForm({ target: "#gLoginFormContainer", success: function(responseText, statusText) { if (!responseText) { diff --git a/modules/user/views/login.html.php b/modules/user/views/login.html.php index ae558dfa..452f51ca 100644 --- a/modules/user/views/login.html.php +++ b/modules/user/views/login.html.php @@ -1,5 +1,5 @@ <? defined("SYSPATH") or die("No direct script access."); ?> -<ul id="gLoginMenu" class="gInline"> +<ul id="gLoginMenu"> <? if ($user): ?> <li><a href="<?= url::site("user/{$user->id}?continue=" . url::current(true))?>"> <?= _("Modify Profile") ?></a></li> |