Permalink
Browse files

Updating build process

  • Loading branch information...
daffl committed Jun 20, 2012
1 parent 9dfbb3c commit 6657ce71afd1dbb38088c9595d654598ebd4feab
View
@@ -1,3 +1,4 @@
.tmp*
grid/scripts/docs/*
dist
+.DS_Store
View
@@ -1,5 +1,6 @@
#!/bin/sh
+# Makes the latest build and pushed it go gh-pages
FOLDER=canui-gh-pages
./js canui/build/make.js
git clone git@github.com:jupiterjs/canui.git $FOLDER
View
@@ -4,7 +4,8 @@ steal('steal/build/pluginify', function() {
var out = "canui/dist/",
excludes = [ 'steal/dev',
- 'can/util/jquery/jquery.1.7.1.js',
+ 'can/',
+ 'jquery/',
'steal/less' ];
steal.File(out).mkdirs();
View
@@ -1,14 +1,14 @@
steal(
'canui/accordion',
- 'canui/block',
- 'canui/fills',
+ 'canui/block'
+// 'canui/fills',
// 'canui/grid',
- 'canui/modal',
- 'canui/positionable',
+// 'canui/modal',
+// 'canui/positionable',
// 'canui/resize',
// 'canui/selectable',
- 'canui/slider',
- 'canui/split',
- 'canui/tooltip'
+// 'canui/slider',
+// 'canui/split',
+// 'canui/tooltip'
// 'canui/table_scroll'
)
View
@@ -4,7 +4,7 @@ steal(
'can/observe/compute',
'jquery/event/drag/limit',
'jquery/event/drag/step'
-).then(function( $ ) {
+).then(function() {
/**
* @class can.ui.Slider
@@ -117,8 +117,6 @@ steal(
this.element.trigger( "changing", current );
this.lastMove = current;
}
-
-
},
"dragend": function( el, ev, drag ) {
this.options.val( this.determineValue() )
@@ -140,8 +138,9 @@ steal(
* @return {Number}
*/
val: function( value ) {
- return this.option.val(value)
+ return this.options.val(value)
},
+
"{val} change" : function(){
// change the position ...
this.lastMove = this.options.val();
Binary file not shown.
Binary file not shown.
View
12 test.js
@@ -1,14 +1,14 @@
steal('funcunit')
.then(
'./accordion/accordion_test.js',
- './block/block_test.js',
- './fills/fills_test.js',
+ './block/block_test.js'
+ // './fills/fills_test.js',
// './grid/grid_test.js',
- './modal/modal_test.js',
+ // './modal/modal_test.js',
// './positionable/positionable_test.js',
- './resize/resize_test.js',
- './selectable/selectable_test.js',
- './slider/slider_test.js'
+ // './resize/resize_test.js',
+ // './selectable/selectable_test.js',
+ // './slider/slider_test.js'
// './tooltip/tooltip_test.js',
// './table_scroll/table_scroll_test.js'
);
View
@@ -0,0 +1,53 @@
+steal('jquery').then(function ($) {
+ /**
+ * @function jQuery.fn.can_ui_layout_wrap
+ * @parent canui
+ * @plugin canui/layout/wrap
+ * @test canui/layout/wrap/qunit.html
+ *
+ * Wraps an element with another element, keeps all margins and
+ * returns the new element.
+ *
+ * @return {jQuery} The new element
+ */
+ var tags = /canvas|textarea|input|select|button|img/i
+ $.fn.can_ui_layout_wrap = function () {
+ var ret = [];
+ this.each(function () {
+ if (this.nodeName.match(tags)) {
+ var $el = $(this),
+ $org = $el
+ //Opera fix for relative positioning
+ if (/relative/.test($el.css('position')) && $.browser.opera)
+ $el.css({ position : 'relative', top : 'auto', left : 'auto' });
+
+ //Create a wrapper element and set the wrapper to the new current internal element
+ var position = $el.css('position')
+ $el.wrap(
+ $('<div class="ui-wrapper"></div>').css({
+ position : position == 'static' ? "relative" : position,
+ width : $el.outerWidth(),
+ height : $el.outerHeight(),
+ top : $el.css('top'),
+ left : $el.css('left')
+ })
+ );
+
+ //Overwrite the original $el
+ $el = $el.parent()
+
+ $elIsWrapper = true;
+
+ //Move margins to the wrapper
+ $el.css({ marginLeft : $org.css("marginLeft"), marginTop : $org.css("marginTop"), marginRight : $org.css("marginRight"), marginBottom : $org.css("marginBottom") });
+ $org.css({ marginLeft : "0px", marginTop : "0px", marginRight : "0px", marginBottom : "0px"});
+
+ ret.push($el)
+ } else {
+ ret.push(this)
+ }
+ });
+
+ return $(ret);
+ }
+});
View
@@ -0,0 +1,44 @@
+steal('can/control', 'can/view', 'can/util/string', function() {
+ can.Control('can.ui.Widget', {
+ defaults : {
+ select : {},
+ view : {},
+ locale : {},
+ event : {}
+ }
+ }, {
+ /**
+ * Make a query within this controls element. Either use the selector from
+ * `this.options.select` or the passed selector.
+ *
+ * @param {String|jQuery} selector The selector to query
+ * @return {Collection} A collection of matching elements
+ */
+ find : function(selector) {
+ return this.element.find(this.options.select[selector] || selector);
+ },
+
+ /**
+ * Returns a localized message
+ *
+ * @param {String} name The name of the message in this.options.locale
+ * @param {Object} options The options to pass
+ * @return {String} The localized message
+ */
+ message : function(name, options) {
+ return can.sub(this.options.locale[name], options);
+ },
+
+ /**
+ * Render a view with a given name which is either a full string or a name in
+ * this.options.views.
+ *
+ * @param {String} name The name or full path of the view
+ * @param [options] The options to pass to the view, passes this control by default
+ * @return {DocumentFragment} The rendered view document fragment
+ */
+ render : function(name, options) {
+ return can.view(this.options.view[name] || name, options || this);
+ }
+ });
+});

0 comments on commit 6657ce7

Please sign in to comment.