Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed inapropriate comments from javascript.

I apologize for letting them get into the main repo in the first place and will pay closer attention to the comments of contributed code in the future.
  • Loading branch information...
commit e22acbdffb37a492622a6e9cd74ef2115afe724b 1 parent 166e3a6
@ojii ojii authored
View
11 cms/static/cms/js/plugins/cms.placeholders.js
@@ -129,7 +129,7 @@ jQuery(document).ready(function ($) {
// bind load event to injected iframe
$('#cms_placeholder-iframe').load(function () {
// set new height and animate
- // cause IE is so awesome, we need a timeout so that slow rendering bitch catches up
+ // set a timeout for slower javascript engines (such as IE)
setTimeout(function () {
var height = $('#cms_placeholder-iframe').contents().find('body').outerHeight(true)+26;
$('#cms_placeholder-iframe').animate({ 'height': height }, 500);
@@ -272,7 +272,8 @@ jQuery(document).ready(function ($) {
var current = plugin.attr('class').split('::')[1];
// lets remove current from array - puke
- // cause ie is a fucking motherfucker it doesn't support indexOf so use jquerys crap instead
+ // unfortunately, Internet Explorer does not support indexOf, so
+ // we use the jQuery cross browers compatible version
var idx = $.inArray(current, array);
array.splice(idx, 1);
@@ -378,8 +379,8 @@ jQuery(document).ready(function ($) {
that.hidePluginList.call(that, el);
});
}, 100);
-
- // ie <7 likes to be fucked on top thats cause he doesnt know z-index
+
+ // Since IE7 (and lower) do not properly support z-index, do a cross browser hack
if($.browser.msie && $.browser.version < '8.0') el.parent().parent().css({'position': 'relative','z-index': 999999});
el.addClass('cms_toolbar-btn-active').data('collapsed', false);
@@ -392,7 +393,7 @@ jQuery(document).ready(function ($) {
// remove the body event
$(document).unbind('click');
- // ie <7 likes to be fucked on top thats cause he doesnt know z-index
+ // Since IE7 (and lower) do not properly support z-index, do a cross browser hack
if($.browser.msie && $.browser.version < '8.0') el.parent().parent().css({'position': '','z-index': ''});
el.removeClass('cms_toolbar-btn-active').data('collapsed', true);
View
11 cms/static/cms/js/plugins/cms.toolbar.js
@@ -17,6 +17,7 @@ jQuery(document).ready(function ($) {
* - CMS.API.Toolbar.registerItems(array);
* - CMS.API.Toolbar.removeItem(id);
* - CMS.API.Toolbar.registerType(function);
+ * - CMS.API.Toolbar.isToolbarHidden();
* @compatibility: IE >= 6, FF >= 2, Safari >= 4, Chrome > =4, Opera >= 10
* TODO: login needs special treatment (errors, login on enter)
* TODO: styling of the collapser button needs to be somehow transparent
@@ -78,7 +79,7 @@ jQuery(document).ready(function ($) {
// apply csrf patch to toolbar from cms.base.js
this.csrf();
- // the toolbar needs to resize depending on the window size on motherfucking ie6
+ // the toolbar needs to resize depending on the window size on ie6
if($.browser.msie && $.browser.version <= '6.0') {
$(window).bind('resize', function () { that.wrapper.css('width', $(window).width()); });
$(window).trigger('resize');
@@ -200,7 +201,7 @@ jQuery(document).ready(function ($) {
// requires: type, order, dir, title, url
// optional: cls
_registerAnchor: function (obj) {
- // take a copy of the template, append it, remove it, copy html... because jquery is stupid
+ // take a copy of the template, append it, remove it, copy html. required because of how jquery works.
var template = this._processTemplate('#cms_toolbar-item_anchor', obj);
// append item
this._injectItem(template, obj.dir, obj.order);
@@ -230,7 +231,7 @@ jQuery(document).ready(function ($) {
_registerSwitcher: function (obj) {
// save reference to this class
var that = this;
- // take a copy of the template, append it, remove it, copy html... because jquery is stupid
+ // take a copy of the template, append it, remove it, copy html. required because of how jquery works.
var template = this._processTemplate('#cms_toolbar-item_switcher', obj);
// should btn be shown?
var btn = template.find('.cms_toolbar-item_switcher-link span');
@@ -272,7 +273,7 @@ jQuery(document).ready(function ($) {
// required: type, order, dir, redirect
// optional: cls, icon, action, hidden
_registerButton: function (obj) {
- // take a copy of the template, append it, remove it, copy html... because jquery is stupid
+ // take a copy of the template, append it, remove it, copy html. required because of how jquery works.
var template = this._processTemplate('#cms_toolbar-item_button', obj);
// append item
this._injectItem(template, obj.dir, obj.order);
@@ -281,7 +282,7 @@ jQuery(document).ready(function ($) {
// required: type, order, dir, items (title, url, method (get/post), cls, icon)
// optional: cls, icon
_registerList: function (obj) {
- // take a copy of the template, append it, remove it, copy html... because jquery is stupid
+ // take a copy of the template, append it, remove it, copy html. required because of how jquery works.
var template = this._processTemplate('#cms_toolbar-item_list', obj);
// item injection logic
Please sign in to comment.
Something went wrong with that request. Please try again.