Skip to content

Commit

Permalink
Merge branch '1082-upgrade-frontend'
Browse files Browse the repository at this point in the history
  • Loading branch information
joetsoi committed Jul 22, 2013
2 parents 6c7b1ee + f9e43bb commit 10419c9
Show file tree
Hide file tree
Showing 37 changed files with 12,873 additions and 8,003 deletions.
2 changes: 1 addition & 1 deletion ckan/public/base/javascript/main.js
Expand Up @@ -82,7 +82,7 @@ this.ckan = this.ckan || {};
// This is useful for when IE7 doesn't properly render parts of the page after
// some dom manipulation has happened
this.jQuery.fn.ie7redraw = function() {
if (jQuery.browser.msie && jQuery.browser.version == '7.0') {
if (jQuery('html').hasClass('ie7')) {
jQuery(this).css('zoom', 1);
}
};
2 changes: 1 addition & 1 deletion ckan/public/base/javascript/modules/custom-fields.js
Expand Up @@ -17,7 +17,7 @@ this.ckan.module('custom-fields', function (jQuery, _) {
* Returns nothing.
*/
initialize: function () {
if (!jQuery.browser.msie || !jQuery.browser.version == '7.0') {
if (!jQuery('html').hasClass('ie7')) {
jQuery.proxyAll(this, /_on/);

var delegated = this.options.fieldSelector + ':last input:first';
Expand Down
2 changes: 1 addition & 1 deletion ckan/public/base/javascript/modules/slug-preview.js
Expand Up @@ -72,7 +72,7 @@ this.ckan.module('slug-preview-slug', function (jQuery, _) {
// Horrible hack to make sure that IE7 rerenders the subsequent
// DOM children correctly now that we've render the slug preview element
// We should drop this horrible hack ASAP
if (jQuery.browser.msie && jQuery.browser.version == '7.0') {
if (jQuery('html').hasClass('ie7')) {
jQuery('.btn').on('click', preview, function(){
jQuery('.controls').ie7redraw();
});
Expand Down
335 changes: 0 additions & 335 deletions ckan/public/base/less/font-awesome.less

This file was deleted.

2 changes: 0 additions & 2 deletions ckan/public/base/less/icons.less
Expand Up @@ -150,8 +150,6 @@
.ckan-icon-background-position(10, "formatMedium");
}

@import url('font-awesome.less');

[class^="icon-"],
[class*=" icon-"] {
display: inline-block;
Expand Down
2 changes: 1 addition & 1 deletion ckan/public/base/test/index.html
Expand Up @@ -110,7 +110,7 @@
params = {};
}

return (new ckan.Client()).getTemplate(filename, params).error(function () {
return (new ckan.Client()).getTemplate(filename, params).fail(function () {
throw new Error('Unable to load fixture: ' + filename);
}).pipe(function (template) {
var fixture = jQuery('#fixture').html(template);
Expand Down
2 changes: 1 addition & 1 deletion ckan/public/base/test/spec/modules/custom-fields.spec.js
Expand Up @@ -66,7 +66,7 @@ describe('ckan.module.CustomFieldsModule()', function () {

this.module.newField();

assert.ok(jQuery.contains(this.module.el, element));
assert.ok(jQuery.contains(this.module.el[0], element));
});
});

Expand Down
Expand Up @@ -30,7 +30,7 @@ describe('ckan.modules.ResourceUploadFieldModule()', function () {
it('should append the upload field to the module element', function () {
this.module.initialize();

assert.ok(jQuery.contains(this.el, this.module.upload));
assert.ok(jQuery.contains(this.el[0], this.module.upload[0]));
});

it('should call .setupFileUpload()', function () {
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified ckan/public/base/vendor/bootstrap/img/glyphicons-halflings.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 0 additions & 12 deletions ckan/public/base/vendor/bootstrap/js/.jshintrc

This file was deleted.

46 changes: 29 additions & 17 deletions ckan/public/base/vendor/bootstrap/js/bootstrap.js
@@ -1,5 +1,5 @@
/* ===================================================
* bootstrap-transition.js v2.3.0
* bootstrap-transition.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#transitions
* ===================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -58,7 +58,7 @@
})

}(window.jQuery);/* ==========================================================
* bootstrap-alert.js v2.3.0
* bootstrap-alert.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#alerts
* ==========================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -156,7 +156,7 @@
$(document).on('click.alert.data-api', dismiss, Alert.prototype.close)

}(window.jQuery);/* ============================================================
* bootstrap-button.js v2.3.0
* bootstrap-button.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#buttons
* ============================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -260,7 +260,7 @@
})

}(window.jQuery);/* ==========================================================
* bootstrap-carousel.js v2.3.0
* bootstrap-carousel.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#carousel
* ==========================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -336,7 +336,7 @@
if (!e) this.paused = true
if (this.$element.find('.next, .prev').length && $.support.transition.end) {
this.$element.trigger($.support.transition.end)
this.cycle()
this.cycle(true)
}
clearInterval(this.interval)
this.interval = null
Expand Down Expand Up @@ -466,7 +466,7 @@
})

}(window.jQuery);/* =============================================================
* bootstrap-collapse.js v2.3.0
* bootstrap-collapse.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#collapse
* =============================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -632,7 +632,7 @@
})

}(window.jQuery);/* ============================================================
* bootstrap-dropdown.js v2.3.0
* bootstrap-dropdown.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
* ============================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -685,6 +685,10 @@
clearMenus()

if (!isActive) {
if ('ontouchstart' in document.documentElement) {
// if mobile we we use a backdrop because click events don't delegate
$('<div class="dropdown-backdrop"/>').insertBefore($(this)).on('click', clearMenus)
}
$parent.toggleClass('open')
}

Expand Down Expand Up @@ -737,6 +741,7 @@
}

function clearMenus() {
$('.dropdown-backdrop').remove()
$(toggle).each(function () {
getParent($(this)).removeClass('open')
})
Expand Down Expand Up @@ -791,13 +796,12 @@
$(document)
.on('click.dropdown.data-api', clearMenus)
.on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('.dropdown-menu', function (e) { e.stopPropagation() })
.on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
.on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)

}(window.jQuery);
/* =========================================================
* bootstrap-modal.js v2.3.0
* bootstrap-modal.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#modals
* =========================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -946,7 +950,7 @@
}

, removeBackdrop: function () {
this.$backdrop.remove()
this.$backdrop && this.$backdrop.remove()
this.$backdrop = null
}

Expand Down Expand Up @@ -1044,7 +1048,7 @@

}(window.jQuery);
/* ===========================================================
* bootstrap-tooltip.js v2.3.0
* bootstrap-tooltip.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame
* ===========================================================
Expand Down Expand Up @@ -1125,7 +1129,15 @@
}

, enter: function (e) {
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
var defaults = $.fn[this.type].defaults
, options = {}
, self

this._options && $.each(this._options, function (key, value) {
if (defaults[key] != value) options[key] = value
}, this)

self = $(e.currentTarget)[this.type](options).data(this.type)

if (!self.options.delay || !self.options.delay.show) return self.show()

Expand Down Expand Up @@ -1397,7 +1409,7 @@

}(window.jQuery);
/* ===========================================================
* bootstrap-popover.js v2.3.0
* bootstrap-popover.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#popovers
* ===========================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -1511,7 +1523,7 @@

}(window.jQuery);
/* =============================================================
* bootstrap-scrollspy.js v2.3.0
* bootstrap-scrollspy.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
* =============================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -1672,7 +1684,7 @@
})

}(window.jQuery);/* ========================================================
* bootstrap-tab.js v2.3.0
* bootstrap-tab.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#tabs
* ========================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -1815,7 +1827,7 @@
})

}(window.jQuery);/* =============================================================
* bootstrap-typeahead.js v2.3.0
* bootstrap-typeahead.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#typeahead
* =============================================================
* Copyright 2012 Twitter, Inc.
Expand Down Expand Up @@ -2150,7 +2162,7 @@

}(window.jQuery);
/* ==========================================================
* bootstrap-affix.js v2.3.0
* bootstrap-affix.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#affix
* ==========================================================
* Copyright 2012 Twitter, Inc.
Expand Down
2 changes: 1 addition & 1 deletion ckan/public/base/vendor/bootstrap/js/bootstrap.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ckan/public/base/vendor/bootstrap/less/bootstrap.less
@@ -1,5 +1,5 @@
/*!
* Bootstrap v2.3.0
* Bootstrap v2.3.2
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
Expand Down
11 changes: 11 additions & 0 deletions ckan/public/base/vendor/bootstrap/less/dropdowns.less
Expand Up @@ -135,6 +135,17 @@
}
}

// Backdrop to catch body clicks on mobile, etc.
// ---------------------------
.dropdown-backdrop {
position: fixed;
left: 0;
right: 0;
bottom: 0;
top: 0;
z-index: @zindexDropdown - 10;
}

// Right aligned dropdowns
// ---------------------------
.pull-right > .dropdown-menu {
Expand Down
2 changes: 1 addition & 1 deletion ckan/public/base/vendor/bootstrap/less/responsive.less
@@ -1,5 +1,5 @@
/*!
* Bootstrap Responsive v2.3.0
* Bootstrap Responsive v2.3.2
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
Expand Down

0 comments on commit 10419c9

Please sign in to comment.