Commits

Ralph Bean committed 5a0c3e8

broke control style out into a css class

  • Participants
  • Parent commits cbf725a

Comments (0)

Files changed (5)

 
 setup(
     name='tw2.tipster',
-    version='2.0b4',
+    version='2.0b5',
     description='Tips for your website :)',
     author='Ralph Bean',
     author_email='ralph.bean@gmail.com',

tw2/tipster/base.py

 import tw2.core as twc
 
 tipster_js = twc.JSLink(filename='static/js/tipster.js', modname='tw2.tipster')
+tipster_css = twc.CSSLink(filename='static/css/tipster.css', modname='tw2.tipster')

tw2/tipster/static/css/tipster.css

+.tipster_controls {
+        font-size: 75%;
+        padding-bottom: 5px;
+        padding-right: 5px;
+        text-align: right;
+}

tw2/tipster/static/js/tipster.js

         var stopTipsURL = window._tipster[selector]['stopTipsURL'];
         var content = window._tipster[selector]['tips'][i];
 
-        var controls = '<div style="font-size: 75%; padding-bottom: 5px; padding-right: 5px; text-align: right;">';
+        var controls = '<div class="tipster_controls">';
         if ( stopTipsURL ) {
                 controls += '<a href="javascript:stopTips(\'' + selector.replace(/:/g, '\\:') + '\');">(don\'t show me tips)</a>&nbsp;';
         }

tw2/tipster/widgets.py

     resources = [
         tw2.jquery.jquery_js,
         tw2_jq_ui.jquery_ui_js, tw2_jq_ui.jquery_ui_css,
-        base.tipster_js
+        base.tipster_js, base.tipster_css
     ]
     template = "mako:tw2.tipster.templates.tipster"