From 738ea5cc8dd924e574c7091a2a75fbf403a60537 Mon Sep 17 00:00:00 2001 From: "Elf M. Sternberg" Date: Sun, 15 Jul 2012 15:50:35 -0700 Subject: [PATCH] It works, but I'm not happy with the bootstrap hackery. Must fix. --- assets/images/thumbsdown.png | Bin 0 -> 6674 bytes assets/images/thumbsup.png | Bin 0 -> 6502 bytes {libs => assets}/jquery-loader.js | 0 {libs => assets}/jquery/jquery-1.7.2.js | 0 {libs => assets}/jquery/jquery.js | 0 {libs => assets}/lawnchair/lawnchair.js | 0 {libs => assets}/qunit/qunit.css | 0 {libs => assets}/qunit/qunit.js | 0 {libs => assets}/require.js | 0 grunt.coffee | 9 +-- grunt.js | 4 +- src/edit_priority_template.haml | 3 - src/edit_priority_tmpl.haml | 3 + src/index.haml | 4 +- src/priority.coffee | 68 +++++++++++++++-------- src/priority_tmpl.haml | 4 +- src/style.less | 70 ++++++++++++++++++++++++ 17 files changed, 130 insertions(+), 35 deletions(-) create mode 100644 assets/images/thumbsdown.png create mode 100644 assets/images/thumbsup.png rename {libs => assets}/jquery-loader.js (100%) rename {libs => assets}/jquery/jquery-1.7.2.js (100%) rename {libs => assets}/jquery/jquery.js (100%) rename {libs => assets}/lawnchair/lawnchair.js (100%) rename {libs => assets}/qunit/qunit.css (100%) rename {libs => assets}/qunit/qunit.js (100%) rename {libs => assets}/require.js (100%) delete mode 100644 src/edit_priority_template.haml create mode 100644 src/edit_priority_tmpl.haml diff --git a/assets/images/thumbsdown.png b/assets/images/thumbsdown.png new file mode 100644 index 0000000000000000000000000000000000000000..3468a8cf50bec8ada6830113ed74c3dd77b2b5d6 GIT binary patch literal 6674 zcmV+t8tvtYP)WFU8GbZ8()Nlj2>E@cM*02y{kL_t(|+Rc1-cogN@ z{{6f&Tayi&Mh%26C`YNGBZiIvfhZpyPy`z)2Rw>m`_94ofx=G|1jGXZih%T9LbFf; z*Z`^0m6DLQo88TpndkS%%q|HeyMYA0Z?4QWlPj5-ckaEP`zi19F5wPrzkD_gEn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QoNRAL!Jp;Pk0Atg6QHu2T)JMKxEg z=CUMKw@Db(uYKw9Kw75eX4B5RO%er^%<+}Li3ZK(y zy{XlZs!AY&!DjOc*|0;hS~Cq+>p??o+_5I3$6jgrKx$5D4B0s9sThAjK~vA=OLzGS z3YxLs*I6klYNdEQfDkvcB$EMWRT~9unnlk1^&zgb#(0}FH$^i%f7I$ikAwOnf z-Qa=EvVZ+`Z@}ZesTI$`Z%NQ+N&q0B?~0IR#gvf9!e|6Q@H-3O&(9aEsscm?05X_G zX#MNWt+ZxVRk9>j-O*v<g`#X)*A!YZ9=6n==$yOyg4<0`FQebZ(d&O%2+Ue zo0f%ZRaJw5qiWXrWXO-1|GcG0|E6mzBOgbzC!V~R^48m3W1HUnzK|r+n;-aA--L*? zFF=tbZP&gGr9#NCqL9gM_t)y$tyd77Lks5L{Mag*?|k>_%WckWShvLIbkqw1^}qEM z3_%kV27}L%keKmk=FjOwiMS&SD!y$SJqq`KIAwp6;ZHQTH*EBrF(xJl zTBAMRacuO3D%R@NcgNJN-|NxLpVNX7@~whXVSu_#pQV3dM#sb3zMu8@;S&i}>ehSL zV6ldDS>O3~u%*~-*_;r6DY0dn9z*y4)-k$v?VUjqmlYx3F%v6oJCm`+o;l&oNBxDa z^nly-K)~Y>LGi7q^@RkT2*#M091_whd*jCI`Y&Iz3ILY(?vC_LTPy8dDjlGGA5KKd ztFHk7HjQ{pw#3Idn16#&zjZ(_-Ch?eFFtKYHNq z5zhwNjC|bFZVI3W4k-giY~zS=Fb5 zNs=H(MG3#dc}ccfJtn*TvTU>cVz1xehwd}K2(3=uG<+y}&tG_3#qExHo6L#tqwQ-Y z7rwc2^W}YSziII~oyNT5$Kd+wPZ*-3VT_AIt&Uxg{qupsft$AZN&ohjP!6|qCz88% cy(8oP|Mc`M4%M_lt^fc407*qoM6N<$f@mPu_W%F@ literal 0 HcmV?d00001 diff --git a/assets/images/thumbsup.png b/assets/images/thumbsup.png new file mode 100644 index 0000000000000000000000000000000000000000..3248833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w6f9GBg5$Ao!S&CoFJTbL7$}_qwlyDu?KIUjhKk8!`g}mOM9b`1+*GtfK4$ z&l7qXH0ryP)cR(?Ghww$wrDTR}0uTQHC zFpEBYQ=OWVUcdjM!JBp--*dXqTGXD17;|eP^Jf0IqYgww1hqnC?VZrQUCMK_vXj@& z3T}552{UlXaBNH7fOfBRU6z)gIZ0pwiISZu6(W?95|SW+KzA@+ce>0#AUFhqO(56> z4wvW|lo4E<@o4F=)Lh@^X18B+qK|YzX1kxum1Ek*xd~^|&p(x0oY&3ea&|0n+89HC z2W9Dw8M+^Nk`#zGL_YH6^pE!~-?;`8`i-g{H~`RjS}*KhxCg!F4p^6-pD{v^9B#8B zR{5tyWr3aGun7bkrQzTY9!Qck+3>x*{NrijKG%U^%Z`x(u4Gz^CZ5Vy#swyo_;l> zFk_C3J1H3RtOzKX2{6tGT7?d3g<38N6D)QM94?37s%upqc=a90#a+y#HRU#nihFEb z(%bt-t(b^4(m+xvN^O+^XAGns6exSrrQo5FOw;OpJSs9_^2Ci!Sq5%;Rs~cMT z3}a%uucm!ut?C7;{96{!zc~(Dk~bWDAg*n^MyWpT@i&!>_T}Cl?{8js9=7+SYm8^2$v7XHQT>g| z2+1me3K6jgL-@@IefZ!lQ`Y@do$;$RisHYioE+LW;{zSWn>ct5eiX}3(zI4QhT&PSj@H!FRs}4SIRH_ zRTtiUa4#5RP5>VP_-M$o7ea3r<%Gn9)@f8|Eqo}aIIpqAZfOt|64f!cC>J)T9X6L8 zTBRCVrIsW}_Db$A|^kGM{in4DukG>~w!LV5t{0-ax0c5I-K0h|LoB#j- M07*qoM6N<$f-qP_-v9sr literal 0 HcmV?d00001 diff --git a/libs/jquery-loader.js b/assets/jquery-loader.js similarity index 100% rename from libs/jquery-loader.js rename to assets/jquery-loader.js diff --git a/libs/jquery/jquery-1.7.2.js b/assets/jquery/jquery-1.7.2.js similarity index 100% rename from libs/jquery/jquery-1.7.2.js rename to assets/jquery/jquery-1.7.2.js diff --git a/libs/jquery/jquery.js b/assets/jquery/jquery.js similarity index 100% rename from libs/jquery/jquery.js rename to assets/jquery/jquery.js diff --git a/libs/lawnchair/lawnchair.js b/assets/lawnchair/lawnchair.js similarity index 100% rename from libs/lawnchair/lawnchair.js rename to assets/lawnchair/lawnchair.js diff --git a/libs/qunit/qunit.css b/assets/qunit/qunit.css similarity index 100% rename from libs/qunit/qunit.css rename to assets/qunit/qunit.css diff --git a/libs/qunit/qunit.js b/assets/qunit/qunit.js similarity index 100% rename from libs/qunit/qunit.js rename to assets/qunit/qunit.js diff --git a/libs/require.js b/assets/require.js similarity index 100% rename from libs/require.js rename to assets/require.js diff --git a/grunt.coffee b/grunt.coffee index e56c91c..f6a41a8 100644 --- a/grunt.coffee +++ b/grunt.coffee @@ -81,7 +81,7 @@ module.exports = (grunt) -> appDir: "dist" baseUrl: "." paths: - jquery: "../libs/jquery/jquery-1.7.2" + jquery: "../assets/jquery/jquery-1.7.2" pragmas: doExclude: true modules: [ name: "priority" ] @@ -91,9 +91,10 @@ module.exports = (grunt) -> install: src: [ - "libs/jquery/jquery-1.7.2.js" - "libs/require.js" - "libs/lawnchair/lawnchair.js" + "assets/jquery/jquery-1.7.2.js" + "assets/require.js" + "assets/lawnchair/lawnchair.js" + "assets/images/*.png" ] dest: "dist" diff --git a/grunt.js b/grunt.js index b11bec7..f27ac1d 100644 --- a/grunt.js +++ b/grunt.js @@ -96,7 +96,7 @@ module.exports = function(grunt) { appDir: "dist", baseUrl: ".", paths: { - jquery: "../libs/jquery/jquery-1.7.2" + jquery: "../assets/jquery/jquery-1.7.2" }, pragmas: { doExclude: true @@ -111,7 +111,7 @@ module.exports = function(grunt) { findNestedDependencies: true }, install: { - src: ["libs/jquery/jquery-1.7.2.js", "libs/require.js", "libs/lawnchair/lawnchair.js"], + src: ["assets/jquery/jquery-1.7.2.js", "assets/require.js", "assets/lawnchair/lawnchair.js", "assets/images/*.png"], dest: "dist" }, mocha: { diff --git a/src/edit_priority_template.haml b/src/edit_priority_template.haml deleted file mode 100644 index 5c42a3f..0000000 --- a/src/edit_priority_template.haml +++ /dev/null @@ -1,3 +0,0 @@ -.edit-priority - .input.edit-priority-field(type="text" value="<%= p.name %>" data-for="<%= p.pos %>") - .button.delete-priority-field(data-for="<%= p.pos %>") diff --git a/src/edit_priority_tmpl.haml b/src/edit_priority_tmpl.haml new file mode 100644 index 0000000..90df047 --- /dev/null +++ b/src/edit_priority_tmpl.haml @@ -0,0 +1,3 @@ +.edit-priority + %input.edit-priority-field(type="text" value="<%= p.name %>" data-pos="<%= p.pos %>" data-ty="<%= type %>") + %button.delete-priority-field(data-for="<%= p.pos %>") diff --git a/src/index.haml b/src/index.haml index 2e8f5fb..c0b6498 100644 --- a/src/index.haml +++ b/src/index.haml @@ -16,10 +16,10 @@ .flow .row-fluid #leftbrain.span6 - %h1#prioritize(data-for="0") Today I Will Pay Attention To: + %h1#prioritize(data-pos="N" data-ty="priority") Today I Will Pay Attention To: #priorities #rightbrain.span6 - %h1#ignorize(data-for="0") Today I Will Ignore: + %h1#ignorize(data-pos="N" data-ty="ignore") Today I Will Ignore: #ignorities #message(style="display:none") diff --git a/src/priority.coffee b/src/priority.coffee index d4763c0..5922747 100644 --- a/src/priority.coffee +++ b/src/priority.coffee @@ -2,7 +2,7 @@ require.config paths: 'jquery': 'jquery-1.7.2' -require ['jquery', 'priority_tmpl', 'lawnchair'], ($, priority_template) -> +require ['jquery', 'priority_tmpl', 'edit_priority_tmpl', 'lawnchair'], ($, priority_template, edit_priority_template) -> class Prioritize @@ -12,45 +12,68 @@ require ['jquery', 'priority_tmpl', 'lawnchair'], ($, priority_template) -> @render() $('body').on 'click', @render - $('#prioritize').on 'click', (ev) => @editPriority(ev, 'priority') - $('#ignorize').on 'click', (ev) => @editPriority(ev, 'ignore') + $('#prioritize').on 'click', @editPriority + $('#ignorize').on 'click', @editPriority - editPriority: (ev, ty = 'parent') => - - - newPriority: (ty, ev) => + editPriority: (ev) => ev.stopPropagation() - return if $('.edit-priority').length > 0 - target = if ty == 'priority' then $('#priorities') else $('#ignorities') - target.append(edit_priorities_template({fur: ty})) - input = $('input.edit-priority-field', target) - maybeNewPrioritySave = (ev) => + # Only allow one edit-priority at a time! + return if $('.edit-priority').length > 0 + + tg = $(ev.currentTarget) + ty = tg.data('ty') + pos = tg.data('pos') + + # If the position is 'N', we're adding a new list item to + # the bottom of a list to be populated. + + if pos == 'N' + @priorities.push({name: '', cat: ty}) + pos = @priorities.length - 1 + (if ty == 'priority' then $('#priorities') else $('#ignorities')) + .append('
  • ') + + # Replace the list item's contents with the editor's + # content. + li = $('#pos-' + pos) + li.html edit_priority_template + p: + name: @priorities[pos].name + pos: pos + type: ty + + input = $('input.edit-priority-field', li) + + maybePrioritySave = (ev) => prioritySave = => - @priorities.push({cat: ty, name: input.val()}) + @priorities[pos] = {cat: ty, name: input.val()} @save() code = if ev.keyCode then ev.keyCode else ev.which return prioritySave() if code == 13 return @cleanAndRender() if code == 27 - input.on 'keyup', maybeNewPrioritySave - $('.delete-priority-field', target).on 'click', @render + deletePriority = (ev) => + ev.stopPropagation() + @priorities[pos].name = "" + @save() + + input.on 'keyup', maybePrioritySave + $('.delete-priority-field', li).on 'click', deletePriority input.focus() save: -> + @clean() @repo.save {key: 'priorities', 'priorities': @priorities}, () => @render() clean: -> - @priorities = ({name: p.name, cat: p.cat} for p in @priorities when c.name.trim() != "") - - cleanAndRender: -> - @clean() - @render() + @priorities = ({name: p.name, cat: p.cat} for p in @priorities when p.name.trim() != "") save: -> + @clean() @repo.save {key: 'priorities', 'priorities': @priorities}, => @render() @@ -62,8 +85,9 @@ require ['jquery', 'priority_tmpl', 'lawnchair'], ($, priority_template) -> r.push({name: @priorities[i].name, cat: @priorities[i].cat, pos: i}) r - $('#priorities').html(priority_template({priorities: priority_enumerate('priority')})) - $('#ignorities').html(priority_template({priorities: priority_enumerate('ignore')})) + $('#priorities').html(priority_template({priorities: priority_enumerate('priority'), type: 'priority'})) + $('#ignorities').html(priority_template({priorities: priority_enumerate('ignore'), type: 'ignore'})) + $('.priorityc').bind 'click', @editPriority $ -> prioritize = new Lawnchair {name: 'Prioritize'}, -> diff --git a/src/priority_tmpl.haml b/src/priority_tmpl.haml index c7ed603..ed90423 100644 --- a/src/priority_tmpl.haml +++ b/src/priority_tmpl.haml @@ -1,5 +1,5 @@ %ul.priorities <% var i,l,p; for(i=0,l=priorities.length;i - %li.task - .taskc <%= p.name %> + %li.priority(id="pos-<%= p.pos %>") + .priorityc(data-ty="<%= type %>" data-pos="<%= p.pos %>") <%= p.name %> <% } %> \ No newline at end of file diff --git a/src/style.less b/src/style.less index 65048b4..caa6bbd 100644 --- a/src/style.less +++ b/src/style.less @@ -96,6 +96,76 @@ body { @fluidGridColumnWidth: 6.382978723%; @fluidGridGutterWidth: 2.127659574%; +@baseFontSize: 13px; +@baseLineHeight: 18px; + +@inputBackground: #fff; +@inputBorder: #ccc; +@inputBorderRadius: 3px; +@inputDisabledBackground: #eee; + +.transition(@transition) { + -webkit-transition: @transition; + -moz-transition: @transition; + -ms-transition: @transition; + -o-transition: @transition; + transition: @transition; +} + +// Border Radius +.border-radius(@radius) { + -webkit-border-radius: @radius; + -moz-border-radius: @radius; + border-radius: @radius; +} + +// Drop shadows +.box-shadow(@shadow) { + -webkit-box-shadow: @shadow; + -moz-box-shadow: @shadow; + box-shadow: @shadow; +} + +// Inputs, Textareas, Selects +input, +textarea, +select, +.uneditable-input { + display: inline-block; + width: 210px; + height: @baseLineHeight; + padding: 4px; + margin-bottom: 9px; + font-size: @baseFontSize; + line-height: @baseLineHeight; + color: #555; + background-color: @inputBackground; + border: 1px solid @inputBorder; + .border-radius(@inputBorderRadius); +} + +// Help out input buttons +input[type="button"], +input[type="reset"], +input[type="submit"] { + width: auto; + height: auto; +} + +input, +textarea { + .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); + @transition: border linear .2s, box-shadow linear .2s; + .transition(@transition); +} +input:focus, +textarea:focus { + border-color: rgba(82,168,236,.8); + outline: 0; + outline: thin dotted \9; /* IE6-9 */ + .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)"); +} + #grid { .core (@gridColumnWidth, @gridGutterWidth) {