MINOR Removed jQuery.metadata usage in CMS, use jQuery.data() and HTML5 data attributes instead. Also fixes errors where jQuery.metadata tries to eval() HTML5 data attrs, which isn't always applicable

This commit is contained in:
Ingo Schommer 2012-02-16 17:13:33 +01:00
parent 9190bc4893
commit ac56fef8b4
2 changed files with 1 additions and 4 deletions

View File

@ -239,7 +239,6 @@ class LeftAndMain extends Controller {
THIRDPARTY_DIR . '/jquery-cookie/jquery.cookie.js', THIRDPARTY_DIR . '/jquery-cookie/jquery.cookie.js',
THIRDPARTY_DIR . '/jquery-query/jquery.query.js', THIRDPARTY_DIR . '/jquery-query/jquery.query.js',
SAPPHIRE_ADMIN_DIR . '/thirdparty/jquery-notice/jquery.notice.js', SAPPHIRE_ADMIN_DIR . '/thirdparty/jquery-notice/jquery.notice.js',
THIRDPARTY_DIR . '/jquery-metadata/jquery.metadata.js',
SAPPHIRE_ADMIN_DIR . '/thirdparty/jsizes/lib/jquery.sizes.js', SAPPHIRE_ADMIN_DIR . '/thirdparty/jsizes/lib/jquery.sizes.js',
SAPPHIRE_ADMIN_DIR . '/thirdparty/jlayout/lib/jlayout.border.js', SAPPHIRE_ADMIN_DIR . '/thirdparty/jlayout/lib/jlayout.border.js',
SAPPHIRE_ADMIN_DIR . '/thirdparty/jlayout/lib/jquery.jlayout.js', SAPPHIRE_ADMIN_DIR . '/thirdparty/jlayout/lib/jquery.jlayout.js',

View File

@ -4,8 +4,6 @@ jQuery.noConflict();
* File: LeftAndMain.js * File: LeftAndMain.js
*/ */
(function($) { (function($) {
$.metadata.setType('html5');
// setup jquery.entwine // setup jquery.entwine
$.entwine.warningLevel = $.entwine.WARN_LEVEL_BESTPRACTISE; $.entwine.warningLevel = $.entwine.WARN_LEVEL_BESTPRACTISE;
$.entwine('ss', function($) { $.entwine('ss', function($) {
@ -347,7 +345,7 @@ jQuery.noConflict();
*/ */
$('.cms-container .field.date input.text').entwine({ $('.cms-container .field.date input.text').entwine({
onmatch: function() { onmatch: function() {
var holder = $(this).parents('.field.date:first'), config = holder.metadata({type: 'class'}); var holder = $(this).parents('.field.date:first'), config = holder.data();
if(!config.showcalendar) return; if(!config.showcalendar) return;
config.showOn = 'button'; config.showOn = 'button';