Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
871e4c3
commit 5679de4
Showing
11 changed files
with
457 additions
and
335 deletions.
There are no files selected for viewing
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
var __animation_to = {}; | ||
|
||
exports.animate = animate; | ||
exports.getPropertiesConfig = getPropertiesConfig; | ||
|
||
function animate(element, propertiesTo, callComplete) { | ||
var _a = Ti.UI.createAnimation(propertiesTo); | ||
element.animate(_a); | ||
callComplete && _a.addEventListener('complete', callComplete); | ||
} | ||
function getPropertiesConfig() { | ||
return __animation_to; | ||
} | ||
|
||
__animation_to = { | ||
up : { | ||
footer : { | ||
height : 2, | ||
leftToRight: { | ||
right: 0, | ||
height: 2 | ||
}, | ||
leftToRightToRightOut: { | ||
right: 0, | ||
height: 2 | ||
}, | ||
expand: { | ||
width: '100%', | ||
height: 2 | ||
} | ||
}, | ||
hint : { | ||
top : 0 | ||
} | ||
}, | ||
down : { | ||
footer : { | ||
height : 1, | ||
leftToRight: { | ||
right: '100%', | ||
height: 2 | ||
}, | ||
leftToRightToRightOut: { | ||
right: '-100%', | ||
height: 2 | ||
}, | ||
expand: { | ||
width: 0, | ||
height: 2 | ||
} | ||
} | ||
}, | ||
minMaxSizeTo : { | ||
right : -64, | ||
duration : 350 | ||
}, | ||
minSizeMaxBack : { | ||
right : 0, | ||
duration : 350 | ||
} | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
exports.listener = listener; | ||
|
||
function listener(element, nameEvent, callback) { | ||
element.addEventListener(nameEvent, callback); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
var _properties = {}; | ||
|
||
exports.apply = apply; | ||
exports.get = get; | ||
exports.set = set; | ||
|
||
function configutarionProperties(list, properties) { | ||
for (var key in list) { | ||
var element = get(list[key], properties); | ||
if (_.isNull(element) || _.isUndefined(element)) | ||
continue; | ||
|
||
set(list[key], element, true); | ||
} | ||
} | ||
function apply(properties) { | ||
properties = properties || {}; | ||
|
||
var list__verif = [ | ||
'titleHint', | ||
'width', | ||
'top', | ||
'bottom', | ||
'keyboardType', | ||
'returnKey', | ||
'password', | ||
'editable', | ||
'maxLength', | ||
'minLength', | ||
'toUpperCase', | ||
'mask', | ||
'required', | ||
'colorFocus', | ||
'colorDefault', | ||
'colorExceeding', | ||
'colorFont', | ||
'colorExceeding', | ||
'animationDuration', | ||
'left', | ||
'right', | ||
'titleHintVisible']; | ||
|
||
configutarionProperties(list__verif, properties); | ||
} | ||
function get(attr, _obj) { | ||
var _objFind = _properties; | ||
|
||
if (!_.isNull(_obj) && !_.isUndefined(_obj)) | ||
_objFind = _obj; | ||
|
||
if (_.isNull(attr) || _.isUndefined(attr)) | ||
return _objFind; | ||
|
||
return new Function('o', 'return o.'+ attr)(_objFind); | ||
}; | ||
function set(path, value, isSetGrafhicFunction) { | ||
if (isSetGrafhicFunction) { | ||
new Function('o', 'o.'+ path + ' = ' + "'"+ value +"'")(_properties); | ||
return; | ||
} | ||
_properties[path] = value; | ||
} | ||
|
||
_properties = { | ||
animationDuration : 200, | ||
position : { | ||
left : '15dp', | ||
right : '15dp' | ||
}, | ||
color : { | ||
default : '#AAA', | ||
focus : '#208FE5', | ||
exceeding : '#FF0000', | ||
}, | ||
control : { | ||
isEditable : true, | ||
isExceeding : false, | ||
isUp : false | ||
}, | ||
EVENTS : { | ||
CLICK : 'click', | ||
FOCUS : 'focus', | ||
BLUR : 'blur', | ||
CHANGE : 'change' | ||
} | ||
}; | ||
|
Oops, something went wrong.