[Testbot] Plone 5.0 - Python 2.7 - Build # 3256 - Still failing! - 0 failure(s)

jenkins at plone.org jenkins at plone.org
Mon Sep 29 15:53:17 UTC 2014


-------------------------------------------------------------------------------
Plone 5.0 - Python 2.7 - Build # 3256 - Still Failing!
-------------------------------------------------------------------------------

http://jenkins.plone.org/job/plone-5.0-python-2.7/3256/


-------------------------------------------------------------------------------
CHANGES
-------------------------------------------------------------------------------

Repository: mockup
Branch: refs/heads/master
Date: 2014-09-29T09:41:11-05:00
Author: Nathan Van Gheem (vangheem) <vangheem at gmail.com>
Commit: https://github.com/plone/mockup/commit/f6a5c644f50ac641f599c37b71632745f7b18741

make orderable

Files changed:
M patterns/resourceregistry/js/fields.js
M patterns/resourceregistry/js/registry.js

diff --git a/patterns/resourceregistry/js/fields.js b/patterns/resourceregistry/js/fields.js
index 972136f..26da985 100644
--- a/patterns/resourceregistry/js/fields.js
+++ b/patterns/resourceregistry/js/fields.js
@@ -4,8 +4,8 @@ define([
   'underscore',
   'mockup-ui-url/views/base',
   'mockup-patterns-sortable',
-  'select2'
-], function($, _, BaseView, Sortable) {
+  'mockup-patterns-select2'
+], function($, _, BaseView, Sortable, Select2) {
   'use strict';
 
 
@@ -218,7 +218,7 @@ define([
       'change select': 'inputChanged'
     },
     inputChanged: function(){
-      this.options.registryData[this.options.name] = this.options.value = this.$('select').val();
+      this.options.registryData[this.options.name] = this.options.value = this.$('.select').select2('val');
       $(document).trigger('resource-data-changed');
     },
 
@@ -238,22 +238,24 @@ define([
       ResourceInputFieldView.prototype.afterRender.apply(this);
       var self = this;
       var values = self.options.value;
-      var $select = self.$('select');
-      if(self.multiple){
-        $select.attr('multiple', true);
-      }
-      $select.select2();
+      var $select = self.$('.select');
+      self.select2 = new Select2($select, {
+        orderable: self.multiple,
+        multiple: self.multiple,
+        data: _.map(self.getSelectOptions(), function(val){
+          return {id: val, text: val};
+        })
+      });
       $select.select2('val', values);
+      $select.on('change', function(){
+        self.inputChanged();
+      });
     },
 
     template: _.template(
       '<label class="col-sm-3 control-label"><%- title %></label>' +
       '<div class="col-sm-9">' +
-        '<select name="name" style="width: 100%">' +
-          '<% _.each(options, function(option) { %>' +
-            '<option value="<%- option %>"><%- option %></option>' +
-          '<% }); %>' +
-        '</select>' +
+        '<input name="name" class="select" type="hidden" style="width: 100%" />' +
         '<%= description %>' +
       '</div>')
   });
diff --git a/patterns/resourceregistry/js/registry.js b/patterns/resourceregistry/js/registry.js
index de41ad4..2f85229 100644
--- a/patterns/resourceregistry/js/registry.js
+++ b/patterns/resourceregistry/js/registry.js
@@ -6,7 +6,7 @@ define([
   'mockup-ui-url/views/base',
   'mockup-utils',
   'mockup-patterns-modal',
-  'mockup-patterns-resourceregistry-url/js/fields',
+  'mockup-patterns-resourceregistry-url/js/fields'
 ], function($, _, BaseView, utils, Modal, fields) {
   'use strict';
 




-------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES.log
Type: application/octet-stream
Size: 2899 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140929/1f377344/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 120678 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140929/1f377344/attachment-0003.obj>


More information about the Testbot mailing list