[jobberbase] r429 committed - refactored: rewritten the HandleLocationOutsideRo method to use only j...

1 view
Skip to first unread message

codesite...@google.com

unread,
Feb 13, 2010, 9:00:34 AM2/13/10
to jobbe...@googlegroups.com
Revision: 429
Author: putyp...@gmail.com
Date: Sat Feb 13 05:59:36 2010
Log: refactored: rewritten the HandleLocationOutsideRo method to use only
jQuery
http://code.google.com/p/jobberbase/source/detail?r=429

Modified:
/trunk/public/js/functions.js

=======================================
--- /trunk/public/js/functions.js Fri Sep 11 11:23:40 2009
+++ /trunk/public/js/functions.js Sat Feb 13 05:59:36 2010
@@ -46,18 +46,18 @@

HandleLocationOutsideRo: function()
{
- if (document.getElementById("location_outside_ro").style.display
== "none")
- {
-
document.getElementById("city_id").setAttribute("disabled", "disabled");
- $("div#location_outside_ro").show();
- document.getElementById("location_outside_ro_where").focus();
-
$("a#other_location_label").html(Jobber.I18n.js.location_pick_from_list);
+ if ($("#location_outside_ro").is(":visible"))
+ {
+ $("#city_id").removeAttr("disabled");
+ $("#location_outside_ro").hide();
+ $("#other_location_label").html(Jobber.I18n.js.location_other);
}
else
{
- document.getElementById("city_id").removeAttribute("disabled");
- $("div#location_outside_ro").hide();
- $("a#other_location_label").html(Jobber.I18n.js.location_other);
+ $("#city_id").attr("disabled", "disabled");
+ $("#location_outside_ro").show();
+ $("#location_outside_ro_where").focus();
+
$("#other_location_label").html(Jobber.I18n.js.location_pick_from_list);
}
},

Reply all
Reply to author
Forward
0 new messages