Skip to content

Commit

Permalink
Rebuild dist/
Browse files Browse the repository at this point in the history
  • Loading branch information
jlukic committed Aug 17, 2015
1 parent 57ee104 commit 9bdcc14
Show file tree
Hide file tree
Showing 24 changed files with 517 additions and 159 deletions.
18 changes: 15 additions & 3 deletions dist/components/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,18 @@ $.api = $.fn.api = function(parameters) {

},

should: {
removeError: function() {
return ( settings.hideError === true || (settings.hideError === 'auto' && !module.is.form()) );
}
},

is: {
disabled: function() {
return ($module.filter(selector.disabled).length > 0);
},
form: function() {
return $module.is('form');
return $module.is('form') || $context.is('form');
},
mocked: function() {
return (settings.mockResponse || settings.mockResponseAsync);
Expand Down Expand Up @@ -562,7 +568,9 @@ $.api = $.fn.api = function(parameters) {
if(settings.errorDuration && status !== 'aborted') {
module.debug('Adding error state');
module.set.error();
setTimeout(module.remove.error, settings.errorDuration);
if( module.should.removeError() ) {
setTimeout(module.remove.error, settings.errorDuration);
}
}
module.debug('API Request failed', errorMessage, xhr);
settings.onFailure.call(context, response, $module, xhr);
Expand Down Expand Up @@ -789,7 +797,7 @@ $.api = $.fn.api = function(parameters) {
url = settings.api[action];
}
else if( module.is.form() ) {
url = $module.attr('action') || false;
url = $module.attr('action') || $context.attr('action') || false;
module.debug('No url or action specified, defaulting to form action', url);
}
return url;
Expand Down Expand Up @@ -1016,9 +1024,13 @@ $.api.settings = {
// duration for loading state
loadingDuration : 0,

// whether to hide errors after a period of time
hideError : 'auto',

// duration for error state
errorDuration : 2000,

// whether parameters should be encoded with encodeURIComponent
encodeParameters : true,

// API action to use
Expand Down
2 changes: 1 addition & 1 deletion dist/components/api.min.js

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions dist/components/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,7 @@
.ui.basic.black.button:focus {
background: transparent !important;
box-shadow: 0px 0px 0px 2px #2f3032 inset !important;
color: #27292a !important;
}
.ui.basic.black.buttons .active.button,
.ui.basic.black.active.button {
Expand Down Expand Up @@ -1413,6 +1414,7 @@
.ui.basic.grey.button:focus {
background: transparent !important;
box-shadow: 0px 0px 0px 2px #8a8a8a inset !important;
color: #838383 !important;
}
.ui.basic.grey.buttons .active.button,
.ui.basic.grey.active.button {
Expand Down Expand Up @@ -1552,6 +1554,7 @@
.ui.basic.brown.button:focus {
background: transparent !important;
box-shadow: 0px 0px 0px 2px #90532b inset !important;
color: #975b33 !important;
}
.ui.basic.brown.buttons .active.button,
.ui.basic.brown.active.button {
Expand Down Expand Up @@ -1691,6 +1694,7 @@
.ui.basic.blue.button:focus {
background: transparent !important;
box-shadow: 0px 0px 0px 2px #0d71bb inset !important;
color: #1678c2 !important;
}
.ui.basic.blue.buttons .active.button,
.ui.basic.blue.active.button {
Expand Down Expand Up @@ -1830,6 +1834,7 @@
.ui.basic.green.button:focus {
background: transparent !important;
box-shadow: 0px 0px 0px 2px #0ea432 inset !important;
color: #16ab39 !important;
}
.ui.basic.green.buttons .active.button,
.ui.basic.green.active.button {
Expand Down Expand Up @@ -1969,6 +1974,7 @@
.ui.basic.orange.button:focus {
background: transparent !important;
box-shadow: 0px 0px 0px 2px #e55b00 inset !important;
color: #f26202 !important;
}
.ui.basic.orange.buttons .active.button,
.ui.basic.orange.active.button {
Expand Down Expand Up @@ -2108,6 +2114,7 @@
.ui.basic.pink.button:focus {
background: transparent !important;
box-shadow: 0px 0px 0px 2px #e10f85 inset !important;
color: #e61a8d !important;
}
.ui.basic.pink.buttons .active.button,
.ui.basic.pink.active.button {
Expand Down Expand Up @@ -2247,6 +2254,7 @@
.ui.basic.violet.button:focus {
background: transparent !important;
box-shadow: 0px 0px 0px 2px #4f20b5 inset !important;
color: #5829bb !important;
}
.ui.basic.violet.buttons .active.button,
.ui.basic.violet.active.button {
Expand Down Expand Up @@ -2386,6 +2394,7 @@
.ui.basic.purple.button:focus {
background: transparent !important;
box-shadow: 0px 0px 0px 2px #8f1eb4 inset !important;
color: #9627ba !important;
}
.ui.basic.purple.buttons .active.button,
.ui.basic.purple.active.button {
Expand Down Expand Up @@ -2525,6 +2534,7 @@
.ui.basic.red.button:focus {
background: transparent !important;
box-shadow: 0px 0px 0px 2px #ca1010 inset !important;
color: #d01919 !important;
}
.ui.basic.red.buttons .active.button,
.ui.basic.red.active.button {
Expand Down Expand Up @@ -2664,6 +2674,7 @@
.ui.basic.teal.button:focus {
background: transparent !important;
box-shadow: 0px 0px 0px 2px #008c86 inset !important;
color: #009c95 !important;
}
.ui.basic.teal.buttons .active.button,
.ui.basic.teal.active.button {
Expand Down Expand Up @@ -2803,6 +2814,7 @@
.ui.basic.olive.button:focus {
background: transparent !important;
box-shadow: 0px 0px 0px 2px #a0b605 inset !important;
color: #a7bd0d !important;
}
.ui.basic.olive.buttons .active.button,
.ui.basic.olive.active.button {
Expand Down Expand Up @@ -2942,6 +2954,7 @@
.ui.basic.yellow.button:focus {
background: transparent !important;
box-shadow: 0px 0px 0px 2px #daa300 inset !important;
color: #eaae00 !important;
}
.ui.basic.yellow.buttons .active.button,
.ui.basic.yellow.active.button {
Expand Down
2 changes: 1 addition & 1 deletion dist/components/button.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/components/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,6 @@ $.fn.dropdown = function(parameters) {
})
;
}

module.debug('Showing only matched items', searchTerm);
module.remove.filteredItem();
$item
Expand Down Expand Up @@ -2364,7 +2363,8 @@ $.fn.dropdown = function(parameters) {
userSuggestion: function(value) {
var
$addition = $menu.children(selector.addition),
alreadyHasValue = module.get.item(value),
$existingItem = module.get.item(value),
alreadyHasValue = $existingItem && $existingItem.not(selector.addition).length,
hasUserSuggestion = $addition.length > 0,
html
;
Expand Down
2 changes: 1 addition & 1 deletion dist/components/dropdown.min.js

Large diffs are not rendered by default.

19 changes: 15 additions & 4 deletions dist/components/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -988,10 +988,12 @@ $.fn.form.settings = {

regExp: {
bracket : /\[(.*)\]/i,
escape : /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,
decimal : /^\-?\d*(\.\d+)?$/,
email : "[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?",
integer : /^\-?\d+$/,
escape : /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,
flags : /^\/(.*)\/(.*)?/,
integer : /^\-?\d+$/,
number : /^\-?\d*(\.\d+)?$/,
url : /(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/i
},

Expand All @@ -1018,10 +1020,10 @@ $.fn.form.settings = {
},

error: {
oldSyntax : 'Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically.',
identifier : 'You must specify a string identifier for each field',
method : 'The method you called is not defined.',
noRule : 'There is no rule matching the one you specified',
method : 'The method you called is not defined.'
oldSyntax : 'Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically.'
},

templates: {
Expand Down Expand Up @@ -1124,6 +1126,15 @@ $.fn.form.settings = {
);
},

// is valid number (with decimal)
decimal: function(value) {
return $.fn.form.settings.regExp.decimal.test(value);
},

// is valid number
number: function(value) {
return $.fn.form.settings.regExp.number.test(value);
},

// is value (case insensitive)
is: function(value, text) {
Expand Down
Loading

0 comments on commit 9bdcc14

Please sign in to comment.