From f09acdbf9b7ed07e0bc967ed56b15488e1762d5d Mon Sep 17 00:00:00 2001 From: "Elf M. Sternberg" Date: Mon, 16 Jul 2012 11:20:23 -0700 Subject: [PATCH] Pretty much the final product. --- assets/images/gear.png | Bin 0 -> 464 bytes assets/jquery/bootstrap-modal.js | 218 +++++++++++++++++++++++ grunt.coffee | 1 + grunt.js | 2 +- src/edit_priority_tmpl.haml | 2 +- src/index.haml | 55 +++--- src/priority.coffee | 146 +++++++-------- src/style.less | 297 ++++++++++++++++++++++++++----- 8 files changed, 580 insertions(+), 141 deletions(-) create mode 100644 assets/images/gear.png create mode 100644 assets/jquery/bootstrap-modal.js diff --git a/assets/images/gear.png b/assets/images/gear.png new file mode 100644 index 0000000000000000000000000000000000000000..7445d23f552931e20617be575b376c8ad2aa37f1 GIT binary patch literal 464 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkEd^4YLkA2*{|i?Ji92 zxIdAfqN#GS91BY(0h^8MB@lwgrcVPHIdE2xT?+d#G}~ zZ|v@M)xDSb&h4z_Xng#5&h73KjVeGPS#77wCjEhHKQTXSkMJxCF#1#@F?sKI_w2W~ zqIQ3~Cx6^h(6T0oA>q}W+sg%WZ`(cQzO}8^uk!gFySFS#n?gf*6(^*8xF;VR7&%Sj zbWw)T)D{7z&`{TuZWUd#1zXE_8GuS!HMd<`r(C(AxYhgP?ABGQ>@p5t=`(DI(0P}>`6e#|(+Q>TfA;ggJnz3#qszX2*&+>tlb>Z6 zHr&jaka{!tmgoKNyMNZyaWmB3e?RH@k;t`SCqB#MGflP)-IF-66%;X^u6{1-oD!M< D3241= literal 0 HcmV?d00001 diff --git a/assets/jquery/bootstrap-modal.js b/assets/jquery/bootstrap-modal.js new file mode 100644 index 0000000..c831de6 --- /dev/null +++ b/assets/jquery/bootstrap-modal.js @@ -0,0 +1,218 @@ +/* ========================================================= + * bootstrap-modal.js v2.0.3 + * http://twitter.github.com/bootstrap/javascript.html#modals + * ========================================================= + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================= */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* MODAL CLASS DEFINITION + * ====================== */ + + var Modal = function (content, options) { + this.options = options + this.$element = $(content) + .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) + } + + Modal.prototype = { + + constructor: Modal + + , toggle: function () { + return this[!this.isShown ? 'show' : 'hide']() + } + + , show: function () { + var that = this + , e = $.Event('show') + + this.$element.trigger(e) + + if (this.isShown || e.isDefaultPrevented()) return + + $('body').addClass('modal-open') + + this.isShown = true + + escape.call(this) + backdrop.call(this, function () { + var transition = $.support.transition && that.$element.hasClass('fade') + + if (!that.$element.parent().length) { + that.$element.appendTo(document.body) //don't move modals dom position + } + + that.$element + .show() + + if (transition) { + that.$element[0].offsetWidth // force reflow + } + + that.$element.addClass('in') + + transition ? + that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : + that.$element.trigger('shown') + + }) + } + + , hide: function (e) { + e && e.preventDefault() + + var that = this + + e = $.Event('hide') + + this.$element.trigger(e) + + if (!this.isShown || e.isDefaultPrevented()) return + + this.isShown = false + + $('body').removeClass('modal-open') + + escape.call(this) + + this.$element.removeClass('in') + + $.support.transition && this.$element.hasClass('fade') ? + hideWithTransition.call(this) : + hideModal.call(this) + } + + } + + + /* MODAL PRIVATE METHODS + * ===================== */ + + function hideWithTransition() { + var that = this + , timeout = setTimeout(function () { + that.$element.off($.support.transition.end) + hideModal.call(that) + }, 500) + + this.$element.one($.support.transition.end, function () { + clearTimeout(timeout) + hideModal.call(that) + }) + } + + function hideModal(that) { + this.$element + .hide() + .trigger('hidden') + + backdrop.call(this) + } + + function backdrop(callback) { + var that = this + , animate = this.$element.hasClass('fade') ? 'fade' : '' + + if (this.isShown && this.options.backdrop) { + var doAnimate = $.support.transition && animate + + this.$backdrop = $('