From 078a79f7e71c944d9bedf0cacf7b97cc6f6ca594 Mon Sep 17 00:00:00 2001 From: "Gun.io Whitespace Robot" Date: Fri, 16 Dec 2011 02:10:38 -0500 Subject: [PATCH] Remove whitespace [Gun.io WhitespaceBot] --- .gitignore | 50 ++++++ README | 6 +- README.txt | 6 +- css/open_review-rtl.css | 24 +-- css/open_review.css | 24 +-- js/jquery/themes/base/ui.dialog.css | 2 +- .../ui-lightness/jquery-ui-1.7.2.custom.css | 4 +- .../themes/ui-lightness/ui.datepicker.css | 2 +- js/jquery/themes/ui-lightness/ui.dialog.css | 2 +- js/jquery/ui/effects.core.js | 2 +- js/jquery/ui/jquery-ui-1.7.3.custom.js | 80 +++++----- js/jquery/ui/ui.accordion.js | 16 +- js/jquery/ui/ui.datepicker.js | 2 +- js/jquery/ui/ui.dialog.js | 12 +- js/jquery/ui/ui.draggable.js | 10 +- js/jquery/ui/ui.progressbar.js | 2 +- js/jquery/ui/ui.slider.js | 14 +- js/jquery/ui/ui.sortable.js | 2 +- js/jquery/ui/ui.tabs.js | 20 +-- js/open_review.js | 142 +++++++++--------- open_review.install | 2 +- open_review.module | 88 +++++------ 22 files changed, 281 insertions(+), 231 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c091839 --- /dev/null +++ b/.gitignore @@ -0,0 +1,50 @@ +# Compiled source # +################### +*.com +*.class +*.dll +*.exe +*.o +*.so +*.pyc + +# Numerous always-ignore extensions +################### +*.diff +*.err +*.orig +*.log +*.rej +*.swo +*.swp +*.vi +*~ + +*.sass-cache +# Folders to ignore +################### +.hg +.svn +.CVS +# OS or Editor folders +################### +.DS_Store +Icon? +Thumbs.db +ehthumbs.db +nbproject +.cache +.project +.settings +.tmproj +*.esproj +*.sublime-project +*.sublime-workspace +# Dreamweaver added files +################### +_notes +dwsync.xml +# Komodo +################### +*.komodoproject +.komodotools diff --git a/README b/README index 30e5c11..53dfb0b 100644 --- a/README +++ b/README @@ -34,7 +34,7 @@ TODO Work with all the various WYSIWYG editors. * TinyMCE supported -- tested on 3.3.6 -* FCKEditor +* FCKEditor * WYMediator * openWYSIWYG * markItUp @@ -43,7 +43,7 @@ Work with all the various WYSIWYG editors. * NiceEdit * Whizzywig - -Test across browsers. + +Test across browsers. Research better form for bringing in jQuery within the module itself? diff --git a/README.txt b/README.txt index 30e5c11..53dfb0b 100644 --- a/README.txt +++ b/README.txt @@ -34,7 +34,7 @@ TODO Work with all the various WYSIWYG editors. * TinyMCE supported -- tested on 3.3.6 -* FCKEditor +* FCKEditor * WYMediator * openWYSIWYG * markItUp @@ -43,7 +43,7 @@ Work with all the various WYSIWYG editors. * NiceEdit * Whizzywig - -Test across browsers. + +Test across browsers. Research better form for bringing in jQuery within the module itself? diff --git a/css/open_review-rtl.css b/css/open_review-rtl.css index ce1d922..28f39a4 100644 --- a/css/open_review-rtl.css +++ b/css/open_review-rtl.css @@ -3,11 +3,11 @@ .indent { margin-left: 20px; - background-color: red; + background-color: red; } .open-review-active { - background-color: yellow; + background-color: yellow; } .open-review-view-dialog-comment { @@ -21,14 +21,14 @@ cursor: pointer; padding-left: 20px; background-image: url('icons/comments.png'); - background-repeat: no-repeat; + background-repeat: no-repeat; } div.ui-dialog .open-review-comment-open-on-para { display: none; } -p.open-review-para { +p.open-review-para { min-height: 50px; } @@ -36,7 +36,7 @@ p.open-review-para { span.open-review-para-actions { display:block; float:right; - padding-left: 5px; + padding-left: 5px; } @@ -53,7 +53,7 @@ span.open-review-para-view { display: block; cursor: pointer; width: 20px; - height: 20px; + height: 20px; padding-right: 20px; background-image: url('icons/comments.png'); background-repeat: no-repeat; @@ -62,10 +62,10 @@ span.open-review-para-view { span.open-review-new { display: block; width: 20px; - height: 20px; + height: 20px; padding-left: 20px; background-image: url('icons/new.png'); - background-repeat: no-repeat; + background-repeat: no-repeat; } div#open-review-comments { width: 30%; @@ -77,7 +77,7 @@ div#open-review-comments { height: auto; margin: 0; width: auto; - + } div.ui-dialog { @@ -96,16 +96,16 @@ div.ui-dialog-titlebar { } span#ui-dialog-title-dialog { - + } di#dialog { - + } div.ui-dialog-content { - + } diff --git a/css/open_review.css b/css/open_review.css index 7399559..785d95a 100644 --- a/css/open_review.css +++ b/css/open_review.css @@ -3,11 +3,11 @@ .indent { margin-left: 20px; - background-color: red; + background-color: red; } .open-review-active { - background-color: yellow; + background-color: yellow; } .open-review-view-dialog-comment { @@ -21,14 +21,14 @@ cursor: pointer; padding-left: 20px; background-image: url('icons/comments.png'); - background-repeat: no-repeat; + background-repeat: no-repeat; } div.ui-dialog .open-review-comment-open-on-para { display: none; } -p.open-review-para { +p.open-review-para { min-height: 50px; } @@ -36,7 +36,7 @@ p.open-review-para { span.open-review-para-actions { display:block; float:left; - padding-right: 5px; + padding-right: 5px; } @@ -53,7 +53,7 @@ span.open-review-para-view { display: block; cursor: pointer; width: 20px; - height: 20px; + height: 20px; padding-left: 20px; background-image: url('icons/comments.png'); background-repeat: no-repeat; @@ -61,10 +61,10 @@ span.open-review-para-view { span.open-review-new { display: block; width: 20px; - height: 20px; + height: 20px; padding-left: 20px; background-image: url('icons/new.png'); - background-repeat: no-repeat; + background-repeat: no-repeat; } div#open-review-comments { width: 30%; @@ -76,7 +76,7 @@ div#open-review-comments { height: auto; margin: 0; width: auto; - + } div.ui-dialog { @@ -95,16 +95,16 @@ div.ui-dialog-titlebar { } span#ui-dialog-title-dialog { - + } di#dialog { - + } div.ui-dialog-content { - + } diff --git a/js/jquery/themes/base/ui.dialog.css b/js/jquery/themes/base/ui.dialog.css index 2997595..8ab0ff4 100644 --- a/js/jquery/themes/base/ui.dialog.css +++ b/js/jquery/themes/base/ui.dialog.css @@ -2,7 +2,7 @@ ----------------------------------*/ .ui-dialog { position: relative; padding: .2em; width: 300px; } .ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; } -.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } diff --git a/js/jquery/themes/ui-lightness/jquery-ui-1.7.2.custom.css b/js/jquery/themes/ui-lightness/jquery-ui-1.7.2.custom.css index 9d7aa08..acee8fd 100644 --- a/js/jquery/themes/ui-lightness/jquery-ui-1.7.2.custom.css +++ b/js/jquery/themes/ui-lightness/jquery-ui-1.7.2.custom.css @@ -302,7 +302,7 @@ .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } .ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; } .ui-datepicker select.ui-datepicker-month-year {width: 100%;} -.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year { width: 49%;} .ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; } .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } @@ -353,7 +353,7 @@ ----------------------------------*/ .ui-dialog { position: relative; padding: .2em; width: 300px; } .ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; } -.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } diff --git a/js/jquery/themes/ui-lightness/ui.datepicker.css b/js/jquery/themes/ui-lightness/ui.datepicker.css index 567f8c9..b604957 100644 --- a/js/jquery/themes/ui-lightness/ui.datepicker.css +++ b/js/jquery/themes/ui-lightness/ui.datepicker.css @@ -12,7 +12,7 @@ .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } .ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; } .ui-datepicker select.ui-datepicker-month-year {width: 100%;} -.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year { width: 49%;} .ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; } .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } diff --git a/js/jquery/themes/ui-lightness/ui.dialog.css b/js/jquery/themes/ui-lightness/ui.dialog.css index 2997595..8ab0ff4 100644 --- a/js/jquery/themes/ui-lightness/ui.dialog.css +++ b/js/jquery/themes/ui-lightness/ui.dialog.css @@ -2,7 +2,7 @@ ----------------------------------*/ .ui-dialog { position: relative; padding: .2em; width: 300px; } .ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; } -.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } diff --git a/js/jquery/ui/effects.core.js b/js/jquery/ui/effects.core.js index 9f1f74f..8139c43 100644 --- a/js/jquery/ui/effects.core.js +++ b/js/jquery/ui/effects.core.js @@ -139,7 +139,7 @@ function _normalizeArguments(a, m) { var callback = o.callback || ( $.isFunction(a[1]) && a[1] ) || ( $.isFunction(a[2]) && a[2] ) || ( $.isFunction(a[3]) && a[3] ); return [a[0], o, speed, callback]; - + } //Extend the methods of jQuery diff --git a/js/jquery/ui/jquery-ui-1.7.3.custom.js b/js/jquery/ui/jquery-ui-1.7.3.custom.js index 8456d82..9d6210f 100644 --- a/js/jquery/ui/jquery-ui-1.7.3.custom.js +++ b/js/jquery/ui/jquery-ui-1.7.3.custom.js @@ -1023,12 +1023,12 @@ $.ui.plugin.add("draggable", "connectToSortable", { }; $.each(inst.sortables, function(i) { - + //Copy over some variables to allow calling the sortable's native _intersectsWith this.instance.positionAbs = inst.positionAbs; this.instance.helperProportions = inst.helperProportions; this.instance.offset.click = inst.offset.click; - + if(this.instance._intersectsWith(this.instance.containerCache)) { //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once @@ -1071,13 +1071,13 @@ $.ui.plugin.add("draggable", "connectToSortable", { this.instance.isOver = 0; this.instance.cancelHelperRemoval = true; - + //Prevent reverting on this forced stop this.instance.options.revert = false; - + // The out event needs to be triggered independently this.instance._trigger('out', event, this.instance._uiHash(this.instance)); - + this.instance._mouseStop(event, true); this.instance.options.helper = this.instance.options._helper; @@ -3096,7 +3096,7 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, { ? [options.connectWith] : options.connectWith; }, - + _getItemsAsjQuery: function(connected) { var self = this; @@ -3687,7 +3687,7 @@ $.widget("ui.accordion", { } this.element.addClass("ui-accordion ui-widget ui-helper-reset"); - + // in lack of child-selectors in CSS we need to mark top-LIs in a UL-accordion for some IE-fix if (this.element[0].nodeName == "UL") { this.element.children("li").addClass("ui-accordion-li-fix"); @@ -3773,10 +3773,10 @@ $.widget("ui.accordion", { contents.css("height", ""); } }, - + _setData: function(key, value) { if(key == 'alwaysOpen') { key = 'collapsible'; value = !value; } - $.widget.prototype._setData.apply(this, arguments); + $.widget.prototype._setData.apply(this, arguments); }, _keydown: function(event) { @@ -3820,11 +3820,11 @@ $.widget("ui.accordion", { var o = this.options, maxHeight; if (o.fillSpace) { - + if($.browser.msie) { var defOverflow = this.element.parent().css('overflow'); this.element.parent().css('overflow', 'hidden'); } maxHeight = this.element.parent().height(); if($.browser.msie) { this.element.parent().css('overflow', defOverflow); } - + this.headers.each(function() { maxHeight -= $(this).outerHeight(); }); @@ -4071,10 +4071,10 @@ $.extend($.ui.accordion, { var s = options.toShow; originalWidth = s[0].style.width; s.width( parseInt(s.parent().width(),10) - parseInt(s.css("paddingLeft"),10) - parseInt(s.css("paddingRight"),10) - (parseInt(s.css("borderLeftWidth"),10) || 0) - (parseInt(s.css("borderRightWidth"),10) || 0) ); - + $.each(fxAttrs, function(i, prop) { hideProps[prop] = 'hide'; - + var parts = ('' + $.css(options.toShow[0], prop)).match(/^([\d+-.]+)(.*)$/); showProps[prop] = { value: parts[1], @@ -4090,7 +4090,7 @@ $.extend($.ui.accordion, { if (settings.prop == 'height') { percentDone = (settings.now - settings.start) / (settings.end - settings.start); } - + options.toShow[0].style[settings.prop] = (percentDone * showProps[settings.prop].value) + showProps[settings.prop].unit; }, @@ -4150,7 +4150,7 @@ var setDataSwitch = { resize: "drag.resizable", resizeStop: "stop.resizable" }, - + uiDialogClasses = 'ui-dialog ' + 'ui-widget ' + @@ -4261,7 +4261,7 @@ $.widget("ui.dialog", { (options.bgiframe && $.fn.bgiframe && uiDialog.bgiframe()); (options.autoOpen && this.open()); - + }, destroy: function() { @@ -4279,7 +4279,7 @@ $.widget("ui.dialog", { close: function(event) { var self = this; - + if (false === self._trigger('beforeclose', event)) { return; } @@ -4296,7 +4296,7 @@ $.widget("ui.dialog", { $.ui.dialog.overlay.resize(); self._isOpen = false; - + // adjust the maxZ to allow other modal dialogs to continue to work (see #4309) if (self.options.modal) { var maxZ = 0; @@ -4321,7 +4321,7 @@ $.widget("ui.dialog", { || (!this.options.stack && !this.options.modal)) { return this._trigger('focus', event); } - + if (this.options.zIndex > $.ui.dialog.maxZ) { $.ui.dialog.maxZ = this.options.zIndex; } @@ -4707,7 +4707,7 @@ $.extend($.ui.dialog.overlay, { } $el.remove(); - + // adjust the maxZ to allow other modal dialogs to continue to work (see #4309) var maxZ = 0; $.each(this.instances, function() { @@ -5030,7 +5030,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { closestHandle .addClass("ui-state-active") .focus(); - + var offset = closestHandle.offset(); var mouseOverHandle = !$(event.target).parents().andSelf().is('.ui-slider-handle'); this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : { @@ -5056,7 +5056,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { var position = { x: event.pageX, y: event.pageY }; var normValue = this._normValueFromMouse(position); - + this._slide(event, this._handleIndex, normValue); return false; @@ -5074,7 +5074,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { return false; }, - + _detectOrientation: function() { this.orientation = this.options.orientation == 'vertical' ? 'vertical' : 'horizontal'; }, @@ -5130,7 +5130,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { var otherVal = this.values(index ? 0 : 1); - if ((this.options.values.length == 2 && this.options.range === true) && + if ((this.options.values.length == 2 && this.options.range === true) && ((index == 0 && newVal > otherVal) || (index == 1 && newVal < otherVal))){ newVal = otherVal; } @@ -5161,7 +5161,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { if (allowed !== false) { this._setData('value', newVal, ( event.type == 'mousedown' && this.options.animate )); } - + } } @@ -5239,7 +5239,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { case 'orientation': this._detectOrientation(); - + this.element .removeClass("ui-slider-horizontal ui-slider-vertical") .addClass("ui-slider-" + this.orientation); @@ -5329,7 +5329,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { } } - + })); $.extend($.ui.slider, { @@ -5541,7 +5541,7 @@ $.widget("ui.tabs", { self.element.queue("tabs", function() { self._trigger('show', null, self._ui(self.anchors[o.selected], self.panels[o.selected])); }); - + this.load(o.selected); } @@ -5688,7 +5688,7 @@ $.widget("ui.tabs", { self.element.queue("tabs", function() { hideTab(el, $hide); }).dequeue("tabs"); - + this.blur(); return false; } @@ -5696,13 +5696,13 @@ $.widget("ui.tabs", { if (o.cookie) { self._cookie(o.selected, o.cookie); } - + self.element.queue("tabs", function() { showTab(el, $show); }); self.load(self.anchors.index(this)); // TODO make passing in node possible, see also http://dev.jqueryui.com/ticket/3171 - + this.blur(); return false; } @@ -5722,7 +5722,7 @@ $.widget("ui.tabs", { self.element.queue("tabs", function() { showTab(el, $show); }); - + self.load(self.anchors.index(this)); } else { @@ -5748,7 +5748,7 @@ $.widget("ui.tabs", { var o = this.options; this.abort(); - + this.element.unbind('.tabs') .removeClass('ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible') .removeData('tabs'); @@ -5830,7 +5830,7 @@ $.widget("ui.tabs", { this.element.queue("tabs", function() { self._trigger('show', null, self._ui(self.anchors[0], self.panels[0])); }); - + this.load(0); } @@ -5997,19 +5997,19 @@ $.extend($.ui.tabs.prototype, { rotate: function(ms, continuing) { var self = this, o = this.options; - + var rotate = self._rotate || (self._rotate = function(e) { clearTimeout(self.rotation); self.rotation = setTimeout(function() { var t = o.selected; self.select( ++t < self.anchors.length ? t : 0 ); }, ms); - + if (e) { e.stopPropagation(); } }); - + var stop = self._unrotate || (self._unrotate = !continuing ? function(e) { if (e.clientX) { // in case of a true click @@ -7448,7 +7448,7 @@ $.extend(Datepicker.prototype, { drawMonth = 0; drawYear++; } - calender += '' + (isMultiMonth ? '' + + calender += '' + (isMultiMonth ? '' + ((numMonths[0] > 0 && col == numMonths[1]-1) ? '
' : '') : ''); group += calender; } @@ -7735,7 +7735,7 @@ $.widget("ui.progressbar", { if (newValue === undefined) { return this._value(); } - + this._setData('value', newValue); return this; }, @@ -7932,7 +7932,7 @@ function _normalizeArguments(a, m) { var callback = o.callback || ( $.isFunction(a[1]) && a[1] ) || ( $.isFunction(a[2]) && a[2] ) || ( $.isFunction(a[3]) && a[3] ); return [a[0], o, speed, callback]; - + } //Extend the methods of jQuery diff --git a/js/jquery/ui/ui.accordion.js b/js/jquery/ui/ui.accordion.js index 6727a0a..5d9cc83 100644 --- a/js/jquery/ui/ui.accordion.js +++ b/js/jquery/ui/ui.accordion.js @@ -40,7 +40,7 @@ $.widget("ui.accordion", { } this.element.addClass("ui-accordion ui-widget ui-helper-reset"); - + // in lack of child-selectors in CSS we need to mark top-LIs in a UL-accordion for some IE-fix if (this.element[0].nodeName == "UL") { this.element.children("li").addClass("ui-accordion-li-fix"); @@ -126,10 +126,10 @@ $.widget("ui.accordion", { contents.css("height", ""); } }, - + _setData: function(key, value) { if(key == 'alwaysOpen') { key = 'collapsible'; value = !value; } - $.widget.prototype._setData.apply(this, arguments); + $.widget.prototype._setData.apply(this, arguments); }, _keydown: function(event) { @@ -173,11 +173,11 @@ $.widget("ui.accordion", { var o = this.options, maxHeight; if (o.fillSpace) { - + if($.browser.msie) { var defOverflow = this.element.parent().css('overflow'); this.element.parent().css('overflow', 'hidden'); } maxHeight = this.element.parent().height(); if($.browser.msie) { this.element.parent().css('overflow', defOverflow); } - + this.headers.each(function() { maxHeight -= $(this).outerHeight(); }); @@ -424,10 +424,10 @@ $.extend($.ui.accordion, { var s = options.toShow; originalWidth = s[0].style.width; s.width( parseInt(s.parent().width(),10) - parseInt(s.css("paddingLeft"),10) - parseInt(s.css("paddingRight"),10) - (parseInt(s.css("borderLeftWidth"),10) || 0) - (parseInt(s.css("borderRightWidth"),10) || 0) ); - + $.each(fxAttrs, function(i, prop) { hideProps[prop] = 'hide'; - + var parts = ('' + $.css(options.toShow[0], prop)).match(/^([\d+-.]+)(.*)$/); showProps[prop] = { value: parts[1], @@ -443,7 +443,7 @@ $.extend($.ui.accordion, { if (settings.prop == 'height') { percentDone = (settings.now - settings.start) / (settings.end - settings.start); } - + options.toShow[0].style[settings.prop] = (percentDone * showProps[settings.prop].value) + showProps[settings.prop].unit; }, diff --git a/js/jquery/ui/ui.datepicker.js b/js/jquery/ui/ui.datepicker.js index f713620..327b03b 100644 --- a/js/jquery/ui/ui.datepicker.js +++ b/js/jquery/ui/ui.datepicker.js @@ -1407,7 +1407,7 @@ $.extend(Datepicker.prototype, { drawMonth = 0; drawYear++; } - calender += '' + (isMultiMonth ? '' + + calender += '' + (isMultiMonth ? '' + ((numMonths[0] > 0 && col == numMonths[1]-1) ? '
' : '') : ''); group += calender; } diff --git a/js/jquery/ui/ui.dialog.js b/js/jquery/ui/ui.dialog.js index 7720424..c84da5b 100644 --- a/js/jquery/ui/ui.dialog.js +++ b/js/jquery/ui/ui.dialog.js @@ -26,7 +26,7 @@ var setDataSwitch = { resize: "drag.resizable", resizeStop: "stop.resizable" }, - + uiDialogClasses = 'ui-dialog ' + 'ui-widget ' + @@ -137,7 +137,7 @@ $.widget("ui.dialog", { (options.bgiframe && $.fn.bgiframe && uiDialog.bgiframe()); (options.autoOpen && this.open()); - + }, destroy: function() { @@ -155,7 +155,7 @@ $.widget("ui.dialog", { close: function(event) { var self = this; - + if (false === self._trigger('beforeclose', event)) { return; } @@ -172,7 +172,7 @@ $.widget("ui.dialog", { $.ui.dialog.overlay.resize(); self._isOpen = false; - + // adjust the maxZ to allow other modal dialogs to continue to work (see #4309) if (self.options.modal) { var maxZ = 0; @@ -197,7 +197,7 @@ $.widget("ui.dialog", { || (!this.options.stack && !this.options.modal)) { return this._trigger('focus', event); } - + if (this.options.zIndex > $.ui.dialog.maxZ) { $.ui.dialog.maxZ = this.options.zIndex; } @@ -583,7 +583,7 @@ $.extend($.ui.dialog.overlay, { } $el.remove(); - + // adjust the maxZ to allow other modal dialogs to continue to work (see #4309) var maxZ = 0; $.each(this.instances, function() { diff --git a/js/jquery/ui/ui.draggable.js b/js/jquery/ui/ui.draggable.js index 2750b0b..86382c9 100644 --- a/js/jquery/ui/ui.draggable.js +++ b/js/jquery/ui/ui.draggable.js @@ -500,12 +500,12 @@ $.ui.plugin.add("draggable", "connectToSortable", { }; $.each(inst.sortables, function(i) { - + //Copy over some variables to allow calling the sortable's native _intersectsWith this.instance.positionAbs = inst.positionAbs; this.instance.helperProportions = inst.helperProportions; this.instance.offset.click = inst.offset.click; - + if(this.instance._intersectsWith(this.instance.containerCache)) { //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once @@ -548,13 +548,13 @@ $.ui.plugin.add("draggable", "connectToSortable", { this.instance.isOver = 0; this.instance.cancelHelperRemoval = true; - + //Prevent reverting on this forced stop this.instance.options.revert = false; - + // The out event needs to be triggered independently this.instance._trigger('out', event, this.instance._uiHash(this.instance)); - + this.instance._mouseStop(event, true); this.instance.options.helper = this.instance.options._helper; diff --git a/js/jquery/ui/ui.progressbar.js b/js/jquery/ui/ui.progressbar.js index e99d317..15da62e 100644 --- a/js/jquery/ui/ui.progressbar.js +++ b/js/jquery/ui/ui.progressbar.js @@ -58,7 +58,7 @@ $.widget("ui.progressbar", { if (newValue === undefined) { return this._value(); } - + this._setData('value', newValue); return this; }, diff --git a/js/jquery/ui/ui.slider.js b/js/jquery/ui/ui.slider.js index 4d2819d..a5bd955 100644 --- a/js/jquery/ui/ui.slider.js +++ b/js/jquery/ui/ui.slider.js @@ -235,7 +235,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { closestHandle .addClass("ui-state-active") .focus(); - + var offset = closestHandle.offset(); var mouseOverHandle = !$(event.target).parents().andSelf().is('.ui-slider-handle'); this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : { @@ -261,7 +261,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { var position = { x: event.pageX, y: event.pageY }; var normValue = this._normValueFromMouse(position); - + this._slide(event, this._handleIndex, normValue); return false; @@ -279,7 +279,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { return false; }, - + _detectOrientation: function() { this.orientation = this.options.orientation == 'vertical' ? 'vertical' : 'horizontal'; }, @@ -335,7 +335,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { var otherVal = this.values(index ? 0 : 1); - if ((this.options.values.length == 2 && this.options.range === true) && + if ((this.options.values.length == 2 && this.options.range === true) && ((index == 0 && newVal > otherVal) || (index == 1 && newVal < otherVal))){ newVal = otherVal; } @@ -366,7 +366,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { if (allowed !== false) { this._setData('value', newVal, ( event.type == 'mousedown' && this.options.animate )); } - + } } @@ -444,7 +444,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { case 'orientation': this._detectOrientation(); - + this.element .removeClass("ui-slider-horizontal ui-slider-vertical") .addClass("ui-slider-" + this.orientation); @@ -534,7 +534,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { } } - + })); $.extend($.ui.slider, { diff --git a/js/jquery/ui/ui.sortable.js b/js/jquery/ui/ui.sortable.js index 357e240..97c19d8 100644 --- a/js/jquery/ui/ui.sortable.js +++ b/js/jquery/ui/ui.sortable.js @@ -468,7 +468,7 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, { ? [options.connectWith] : options.connectWith; }, - + _getItemsAsjQuery: function(connected) { var self = this; diff --git a/js/jquery/ui/ui.tabs.js b/js/jquery/ui/ui.tabs.js index dac7002..8d5e2a9 100644 --- a/js/jquery/ui/ui.tabs.js +++ b/js/jquery/ui/ui.tabs.js @@ -188,7 +188,7 @@ $.widget("ui.tabs", { self.element.queue("tabs", function() { self._trigger('show', null, self._ui(self.anchors[o.selected], self.panels[o.selected])); }); - + this.load(o.selected); } @@ -335,7 +335,7 @@ $.widget("ui.tabs", { self.element.queue("tabs", function() { hideTab(el, $hide); }).dequeue("tabs"); - + this.blur(); return false; } @@ -343,13 +343,13 @@ $.widget("ui.tabs", { if (o.cookie) { self._cookie(o.selected, o.cookie); } - + self.element.queue("tabs", function() { showTab(el, $show); }); self.load(self.anchors.index(this)); // TODO make passing in node possible, see also http://dev.jqueryui.com/ticket/3171 - + this.blur(); return false; } @@ -369,7 +369,7 @@ $.widget("ui.tabs", { self.element.queue("tabs", function() { showTab(el, $show); }); - + self.load(self.anchors.index(this)); } else { @@ -395,7 +395,7 @@ $.widget("ui.tabs", { var o = this.options; this.abort(); - + this.element.unbind('.tabs') .removeClass('ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible') .removeData('tabs'); @@ -477,7 +477,7 @@ $.widget("ui.tabs", { this.element.queue("tabs", function() { self._trigger('show', null, self._ui(self.anchors[0], self.panels[0])); }); - + this.load(0); } @@ -644,19 +644,19 @@ $.extend($.ui.tabs.prototype, { rotate: function(ms, continuing) { var self = this, o = this.options; - + var rotate = self._rotate || (self._rotate = function(e) { clearTimeout(self.rotation); self.rotation = setTimeout(function() { var t = o.selected; self.select( ++t < self.anchors.length ? t : 0 ); }, ms); - + if (e) { e.stopPropagation(); } }); - + var stop = self._unrotate || (self._unrotate = !continuing ? function(e) { if (e.clientX) { // in case of a true click diff --git a/js/open_review.js b/js/open_review.js index 5746e9f..45397d7 100644 --- a/js/open_review.js +++ b/js/open_review.js @@ -2,12 +2,12 @@ /** * @file - * Javascript for managing jQuery dialogs for viewing and writing comments - * + * Javascript for managing jQuery dialogs for viewing and writing comments + * */ - + var OpenReview = { - + /** * Array of open dialogs */ @@ -17,7 +17,7 @@ var OpenReview = { * An offset used to keep new dialogs distinguishable when opened */ offset: 0, - + /** * The editor that OpenReview detects */ @@ -28,29 +28,29 @@ var OpenReview = { * Array of the editors javascript objects to check for */ - wysiwygs: ['tinyMCE'], - + wysiwygs: ['tinyMCE'], + /** * Opens a dialog for commenting on a paragraph * @param {Object} event */ openCommentDialog: function(event) { - + $('.ui-dialog-title').removeClass('open-review-active'); $('.open-review-para').removeClass('open-review-active'); if($(event.target).hasClass('open-review-view-dialog-comment')) { - var paraId = $(event.target).data('paraId'); + var paraId = $(event.target).data('paraId'); } else if($(event.target).hasClass('open-review-para-comment')) { - var paraId = event.target.parentNode.parentNode.id; + var paraId = event.target.parentNode.parentNode.id; } - + var commentDialog = $('#open-review-comment-form-dialog').dialog(OpenReview.commentSettings); commentDialog.dialog('moveToTop'); $('.ui-dialog-title', commentDialog.parent()).addClass('open-review-active'); $('#' + paraId).addClass('open-review-active'); - - commentDialog.empty(); + + commentDialog.empty(); commentDialog.data('paraId', paraId); commentDialog.dialog('option', 'title', Drupal.t("Comments on ") + OpenReview.getParaSnippet(paraId)); commentDialog.dialog('option', 'width', '550'); @@ -60,34 +60,34 @@ var OpenReview = { }, // Making the wysiwyg editors work properly with jQuery requires some shenanigans. - // appendCommentFormClone, commentFormUninit, and commmentFormInit aim to + // appendCommentFormClone, commentFormUninit, and commmentFormInit aim to // handle that on an editor-by-editor basis. /** * Uninitialize the editors if needed before the jQuery starts working - * @param string editorElId the id of the editor element to uninitialize + * @param string editorElId the id of the editor element to uninitialize */ - commentFormUninit: function(editorElId) { + commentFormUninit: function(editorElId) { switch(OpenReview.editor) { - case 'tinyMCE': + case 'tinyMCE': tinyMCE.execCommand('mceRemoveControl', false, 'edit-comment'); tinyMCE.execCommand('mceRemoveControl', false, editorElId); break; } }, - + /** * Reinitialize the editors after the jQuery has placed the elements in dialogs * @param string editorElId */ - + commentFormInit: function(editorElId) { switch(OpenReview.editor) { case 'tinyMCE': tinyMCE.execCommand('mceAddControl', false, 'edit-comment'); tinyMCE.execCommand('mceAddControl', false, editorElId); - + break; } }, @@ -96,49 +96,49 @@ var OpenReview = { * @param string paraId id of the para being commented on * @param {Object} d the jQuery dialog to append the comment form to */ - appendCommentFormClone: function(paraId, d) { + appendCommentFormClone: function(paraId, d) { if(d.attr('id') == 'open-review-comment-form-dialog' ) { - var mceId = 'edit-' + paraId + '-cForm'; + var mceId = 'edit-' + paraId + '-cForm'; } else { var mceId = 'edit-' + paraId; } - OpenReview.commentFormUninit(mceId); - - var commentFormClone = $('#open-review-comment-form').clone(); + OpenReview.commentFormUninit(mceId); + + var commentFormClone = $('#open-review-comment-form').clone(); commentFormClone.append($('#edit-open-review-para-id').clone()); $('#edit-open-review-para-id', commentFormClone).val(paraId); $('textarea', commentFormClone).attr('id', mceId); - - d.append(commentFormClone); - $('textarea', commentFormClone).addClass('wtf'); + + d.append(commentFormClone); + $('textarea', commentFormClone).addClass('wtf'); OpenReview.commentFormInit(mceId); - + }, - + /** * Opens a dialog for viewing all the comments on a paragraph * @param {Object} event */ openViewDialog: function(event) { - + if( $(event.target).hasClass('open-review-comment-open-on-para')) { var id = $(event.target).parent().attr('id'); var paraId = id.replace('open-review-on-para-', ''); var targetP = event.target; - var pos = [targetP.offsetLeft + targetP.clientWidth / 3 + 150 + OpenReview.commentViewDialogs.length * 30, targetP.clientTop - 30]; + var pos = [targetP.offsetLeft + targetP.clientWidth / 3 + 150 + OpenReview.commentViewDialogs.length * 30, targetP.clientTop - 30]; } else if( $(event.target).hasClass('open-review-para-view')) { var targetP = event.target.parentNode.parentNode; var pos = [targetP.offsetLeft + targetP.clientWidth / 3 + 150 + OpenReview.commentViewDialogs.length * 30, targetP.offsetTop - 30]; - var paraId = targetP.id; + var paraId = targetP.id; } var d = OpenReview.getCommentViewDialog(paraId); d.empty(); - - var snippet = OpenReview.getParaSnippet(paraId); - + + var snippet = OpenReview.getParaSnippet(paraId); + var comments = $(OpenReview.gatherCommentsForPara(paraId)); comments.each(function(index, el) { @@ -149,21 +149,21 @@ var OpenReview = { el = $(el).parent(); } var indent = 20 * indentCount + 'px'; - $(elClone).css({marginLeft: indent}) ; + $(elClone).css({marginLeft: indent}) ; d.append(elClone); }); d.dialog('option', 'title', Drupal.t("Comments on ") + snippet); - d.dialog('option', 'position', pos); + d.dialog('option', 'position', pos); d.dialog('open'); if(OpenReview.commentsInPopup) { - OpenReview.appendCommentFormClone(paraId, d); + OpenReview.appendCommentFormClone(paraId, d); } else { d.append(OpenReview.getViewDialogCommentLink(paraId)); } }, - + /** * Gathers the comments that apply to a paragraph * @param string paraId @@ -171,28 +171,28 @@ var OpenReview = { */ gatherCommentsForPara: function(paraId) { var returnArray = new Array(); - + var comments = $('.comment').each(function(index, el) { var orSpans = $('#open-review-on-para-' + paraId, el); - + if(orSpans.length != 0) { returnArray[returnArray.length] = el; - } + } }); $.unique(returnArray); - return returnArray; + return returnArray; }, - - - getViewDialogCommentLink: function(paraId) { + + + getViewDialogCommentLink: function(paraId) { var link = document.createElement('p'); $(link).text('Add Comment'); $(link).data('paraId', paraId); - $(link).addClass('open-review-view-dialog-comment'); - $(link).click(OpenReview.openCommentDialog); - return link; + $(link).addClass('open-review-view-dialog-comment'); + $(link).click(OpenReview.openCommentDialog); + return link; }, - + /** * Return the dialog to view comments on a paragraph, or create one if needed * @param string paraId @@ -203,10 +203,10 @@ var OpenReview = { $('.ui-dialog-title').removeClass('open-review-active'); for(var i = 0; i 180) { OpenReview.offset = 0; } return OpenReview.offset; - } + } } -OpenReview.commentViewSettings = +OpenReview.commentViewSettings = { autoOpen: false, draggable: true, @@ -318,7 +318,7 @@ OpenReview.commentSettings = eval(editor); OpenReview.editor = editor; } catch (e) { - - } + + } } }); diff --git a/open_review.install b/open_review.install index 038838e..9e8e70a 100644 --- a/open_review.install +++ b/open_review.install @@ -1,5 +1,5 @@ $cid, 'p_id' => $para_id ); + + $data = array('cid' => $cid, 'p_id' => $para_id ); drupal_write_record('open_review', $data ); - + break; case 'delete': db_query('DELETE FROM {open_review} WHERE cid = %d', $a1->cid); - break; + break; } } /** * Implementation of hook_form_alter(). */ - + function open_review_form_alter(&$form, $form_state, $form_id) { if ($form_id == 'comment_form') { $form['comment_filter']['open_review_para_id'] = array( - '#type' => 'hidden' + '#type' => 'hidden' ); $form['#prefix'] = "
"; - $form['#suffix'] = "
"; - } - elseif ($form_id = 'node_type_form' && isset($form['identity']['type'])) { + $form['#suffix'] = ""; + } + elseif ($form_id = 'node_type_form' && isset($form['identity']['type'])) { $form['comment']['open_review'] = array( '#type' => 'radios', '#title' => t('Open Review Comments'), '#default_value' => variable_get('open_review_' . $form['#node_type']->type, 0), '#options' => array(0 => t('Disabled'), 1 => t('Enabled')), - '#description' => t('Use Open Review for this content type?') + '#description' => t('Use Open Review for this content type?') ); - + $form['comment']['open_review_form_in_popup'] = array( '#type' => 'radios', '#title' => t('Open Review Comment Form in Popups?'), '#default_value' => variable_get('open_review_form_in_popup_'. $form['#node_type']->type, 0), '#options' => array(0 => t('No comment form'), 1 => t('Comment form under paragraph comments')), - '#description' => t('Show the comment form under paragraph comments?') - ); - } + '#description' => t('Show the comment form under paragraph comments?') + ); + } } /** * Implementation of hook_nodeapi() */ - + function open_review_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { - + if ($op=='view') { if (variable_get('open_review_' . $node->type, 0)) { //I'm bringing in my own copy of jQuery and jQuery UI because the jQuery Upgrade and jQuery UI @@ -93,7 +93,7 @@ function open_review_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { //jquery UI also breaks when switching themes, and theme-agnosticsim is a design goal //of open_review: it's something that sets it apart from CommentPress drupal_add_css(drupal_get_path('module', 'open_review') . '/js/jquery/themes/base/ui.dialog.css'); - drupal_add_css(drupal_get_path('module', 'open_review') . '/js/jquery/themes/base/ui.resizable.css'); + drupal_add_css(drupal_get_path('module', 'open_review') . '/js/jquery/themes/base/ui.resizable.css'); drupal_add_js(drupal_get_path('module', 'open_review') . '/js/jquery/jquery-1.3.2.min.js'); drupal_add_js(drupal_get_path('module', 'open_review') . '/js/jquery/jquery-ui-1.7.3.custom.min.js'); drupal_add_js(drupal_get_path('module', 'open_review') . '/js/open_review.js'); @@ -106,38 +106,38 @@ function open_review_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { $xpath = new DOMXPath($dom); $ps = $dom->getElementsByTagName('p'); - + foreach ($ps as $p) { - - $id = "p-" . sha1($p->textContent); - $p->setAttribute('id', $id); - $p->setAttribute('class', 'open-review-para'); + + $id = "p-" . sha1($p->textContent); + $p->setAttribute('id', $id); + $p->setAttribute('class', 'open-review-para'); $actionsEl = $dom->createElement('span'); $actionsEl->setAttribute('class', 'open-review-para-actions'); - - $commentEl = $dom->createElement('span'); + + $commentEl = $dom->createElement('span'); $commentEl->setAttribute('class', 'open-review-para-comment'); $commentEl->setAttribute('title', 'Add A Comment'); $actionsEl->appendChild($commentEl); - - $result = db_result(db_query('SELECT COUNT(*) FROM {open_review} WHERE p_id = "%s" ', $id )); - if ($result > 0 ) { + + $result = db_result(db_query('SELECT COUNT(*) FROM {open_review} WHERE p_id = "%s" ', $id )); + if ($result > 0 ) { $viewEl = $dom->createElement('span', $result); $viewEl->setAttribute('class', 'open-review-para-view'); $viewEl->setAttribute('title', 'View Comments'); $actionsEl->appendChild($viewEl); } - - $newCount = open_review_comment_num_new($node->nid, $id); + + $newCount = open_review_comment_num_new($node->nid, $id); if ($newCount > 0) { $newEl = $dom->createElement('span', $newCount); $newEl->setAttribute('class', 'open-review-new'); - $actionsEl->appendChild($newEl); + $actionsEl->appendChild($newEl); } - $p->insertBefore($actionsEl, $p->firstChild); - } - $node->content['body']['#value'] = $dom->saveHTML(); + $p->insertBefore($actionsEl, $p->firstChild); + } + $node->content['body']['#value'] = $dom->saveHTML(); } } } @@ -145,22 +145,22 @@ function open_review_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { /** * Implementation of hook_footer() */ - -function open_review_footer() { + +function open_review_footer() { $node = node_load(arg(1)); - if (variable_get('open_review_' . $node->type, 0)) { + if (variable_get('open_review_' . $node->type, 0)) { $output = ""; $output .= ""; + $output .= ""; return $output; } } @@ -186,9 +186,9 @@ function open_review_comment_num_new($nid, $paraId, $timestamp = 0) { $timestamp = ($timestamp > NODE_NEW_LIMIT ? $timestamp : NODE_NEW_LIMIT); // Use the timestamp to retrieve the number of new comments. - + $query = "SELECT COUNT(c.cid) FROM {node} n INNER JOIN {comments} c ON n.nid = c.nid INNER JOIN {open_review} o ON c.cid = o.cid WHERE n.nid = %d AND timestamp > %d AND c.status = %d AND o.p_id = '%s' " ; - $result = db_result(db_query('SELECT COUNT(c.cid) FROM {node} n INNER JOIN {comments} c ON n.nid = c.nid INNER JOIN {open_review} o ON c.cid = o.cid WHERE n.nid = %d AND timestamp > %d AND c.status = %d AND o.p_id = "%s" ', $nid, $timestamp, COMMENT_PUBLISHED, $paraId)); + $result = db_result(db_query('SELECT COUNT(c.cid) FROM {node} n INNER JOIN {comments} c ON n.nid = c.nid INNER JOIN {open_review} o ON c.cid = o.cid WHERE n.nid = %d AND timestamp > %d AND c.status = %d AND o.p_id = "%s" ', $nid, $timestamp, COMMENT_PUBLISHED, $paraId)); return $result; }