[marinemap] push by perrygeo...@gmail.com - Support for adding feature icons to the Create New menu on 2011-12-02 17:37 GMT

0 views
Skip to first unread message

mari...@googlecode.com

unread,
Dec 2, 2011, 12:38:24 PM12/2/11
to marinema...@googlegroups.com
Revision: 7413744b9c6a
Author: Matthew Perry <perryg...@gmail.com>
Date: Fri Dec 2 09:41:24 2011
Log: Support for adding feature icons to the Create New menu
http://code.google.com/p/marinemap/source/detail?r=7413744b9c6a

Modified:
/lingcod/features/models.py
/media/features/js/kmlEditor.js

=======================================
--- /lingcod/features/models.py Thu Oct 6 14:47:22 2011
+++ /lingcod/features/models.py Fri Dec 2 09:41:24 2011
@@ -97,7 +97,15 @@
return """ li.%s > .icon {
background: url("%s") no-repeat scroll 0 0 transparent !
important;
display:inline ! important;
- } """ % (klass.model_uid(), url)
+ }
+
+ div.%s > .goog-menuitem-content {
+ background: url("%s") no-repeat scroll 0 0
transparent !important;
+ display: block !important;
+ padding-left: 22px;
+ position: relative;
+ left: -22px;
+ } """ % (klass.model_uid(), url, klass.model_uid(), url)

@property
def options(self):
=======================================
--- /media/features/js/kmlEditor.js Tue Oct 18 16:37:33 2011
+++ /media/features/js/kmlEditor.js Fri Dec 2 09:41:24 2011
@@ -215,7 +215,10 @@
button.setVisible(true);
// button.setEnabled(true);
jQuery.each(createActions, function(i, action){
+ var img
= 'http://wp.hestia.ecotrust.org/media/common/images/watershed.png';
+ var cls = action.links[0].featureClass.id;
var item = new goog.ui.MenuItem(action.title);
+ item.addClassName(cls);
// SPECIAL CASE
// Bookmarks, though they can be registered as a
feature,
// should not show up in the Create New menu since
there is

Reply all
Reply to author
Forward
0 new messages