Author: justi9
Date: 2007-11-20 15:52:02 -0500 (Tue, 20 Nov 2007)
New Revision: 1343
Modified:
mgmt/cumin/python/cumin/page.strings
mgmt/cumin/python/cumin/widgets.py
mgmt/cumin/python/wooly/forms.strings
Log:
Adds icons to form buttons.
Modified: mgmt/cumin/python/cumin/page.strings
===================================================================
--- mgmt/cumin/python/cumin/page.strings 2007-11-20 20:22:42 UTC (rev 1342)
+++ mgmt/cumin/python/cumin/page.strings 2007-11-20 20:52:02 UTC (rev 1343)
@@ -353,12 +353,33 @@
form.mform button, form.mform a.help {
margin: 0.5em;
+ padding: 0.25em 0.25em 0 0.25em;
}
form.mform a.help {
float: left;
+ margin: 0.5em;
+ padding: 0.25em 0.25em 0 0.25em;
}
+form.mform a.help:before {
+ content: url(resource?name=notice-20.png);
+ padding: 0 0.25em 0 0;
+ vertical-align: -35%;
+}
+
+form.mform button.cancel:before {
+ content: url(resource?name=cancel-20.png);
+ padding: 0 0.25em 0 0;
+ vertical-align: -35%;
+}
+
+form.mform button.submit:before {
+ content: url(resource?name=submit-20.png);
+ padding: 0 0.25em 0 0;
+ vertical-align: -35%;
+}
+
select {
border-style: groove;
}
Modified: mgmt/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/cumin/python/cumin/widgets.py 2007-11-20 20:22:42 UTC (rev 1342)
+++ mgmt/cumin/python/cumin/widgets.py 2007-11-20 20:52:02 UTC (rev 1343)
@@ -112,10 +112,16 @@
return "Submit"
class Cancel(FormButton):
+ def render_class(self, session, object):
+ return "cancel"
+
def render_content(self, session, object):
return self.parent().render_cancel_content(session, object)
class Submit(FormButton):
+ def render_class(self, session, object):
+ return "submit"
+
def render_content(self, session, object):
return self.parent().render_submit_content(session, object)
Modified: mgmt/cumin/python/wooly/forms.strings
===================================================================
--- mgmt/cumin/python/wooly/forms.strings 2007-11-20 20:22:42 UTC (rev 1342)
+++ mgmt/cumin/python/wooly/forms.strings 2007-11-20 20:52:02 UTC (rev 1343)
@@ -1,5 +1,5 @@
[FormButton.html]
-<button id="{id}" type="submit" name="{name}"
value="{value}" tabindex="{tab_index}"
{disabled_attr}>{content}</button>
+<button class="{class}" id="{id}" type="submit"
name="{name}" value="{value}" tabindex="{tab_index}"
{disabled_attr}>{content}</button>
[FormInput.errors_html]
<ul class="errors">{error_messages}</ul>
Show replies by date