Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
* applied strict organization rules.
Browse files Browse the repository at this point in the history
  • Loading branch information
eser committed Nov 9, 2016
1 parent e01cc34 commit 7e6a2b9
Show file tree
Hide file tree
Showing 32 changed files with 477 additions and 477 deletions.
4 changes: 2 additions & 2 deletions build/dist/laroux.web.mvvm/laroux.web.mvvm.js
Expand Up @@ -19,7 +19,7 @@ var web_mvvm = {

init: function init(element, model) {
if (element.constructor === String) {
element = $l.dom.selectById(element);
element = $l.web.dom.selectById(element);
}

// if (model.constructor !== types.Observable) {
Expand Down Expand Up @@ -75,7 +75,7 @@ var web_mvvm = {
};

for (var i = 0, _length = app.eventElements.length; i < _length; i++) {
$l.dom.setEvent(app.eventElements[i].element, app.eventElements[i].binding[null], callback);
$l.web.dom.setEvent(app.eventElements[i].element, app.eventElements[i].binding[null], callback);
}
},

Expand Down
2 changes: 1 addition & 1 deletion build/dist/laroux.web.mvvm/laroux.web.mvvm.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/dist/laroux.web.mvvm/laroux.web.mvvm.min.js.map

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions build/dist/laroux.web.ui/laroux.web.ui.js
Expand Up @@ -18,7 +18,7 @@ var web_ui_dynamicDates = {

updateDates: function updateDates() {
if (web_ui_dynamicDates.updateDatesElements === null) {
web_ui_dynamicDates.updateDatesElements = $l.dom.select('*[data-epoch]');
web_ui_dynamicDates.updateDatesElements = $l.web.dom.select('*[data-epoch]');
}

for (var item in web_ui_dynamicDates.updateDatesElements) {
Expand All @@ -30,7 +30,7 @@ var web_ui_dynamicDates = {
// bitshifting (str >> 0) used instead of parseInt(str, 10)
var date = new Date((obj.getAttribute('data-epoch') >> 0) * 1000);

$l.dom.replace(obj, $l.intl.shortDate(date));
$l.web.dom.replace(obj, $l.intl.shortDate(date));

obj.setAttribute('title', $l.intl.longDate(date));
}
Expand Down Expand Up @@ -88,7 +88,7 @@ var web_ui = {

createFloatContainer: function createFloatContainer() {
if (!web_ui.floatContainer) {
web_ui.floatContainer = $l.dom.createElement('DIV', { id: 'laroux-floatdiv', 'class': 'laroux-floatdiv' });
web_ui.floatContainer = $l.web.dom.createElement('DIV', { id: 'laroux-floatdiv', 'class': 'laroux-floatdiv' });
document.body.insertBefore(web_ui.floatContainer, document.body.firstChild);
}
}
Expand Down Expand Up @@ -123,7 +123,7 @@ var web_ui_loading = {
hide: function hide() {
web_ui_loading.killTimer();

$l.css.setProperty(web_ui_loading.element, { display: 'none' });
$l.web.css.setProperty(web_ui_loading.element, { display: 'none' });
localStorage.loadingIndicator = 'false';
},

Expand All @@ -139,19 +139,19 @@ var web_ui_loading = {
web_ui_loading.show(0);
}, delay);
} else {
$l.css.setProperty(web_ui_loading.element, { display: 'block' });
$l.web.css.setProperty(web_ui_loading.element, { display: 'block' });
localStorage.loadingIndicator = 'true';
}
},

init: function init() {
if (web_ui_loading.element === null && web_ui_loading.elementSelector !== null) {
web_ui_loading.element = $l.dom.selectSingle(web_ui_loading.elementSelector);
web_ui_loading.element = $l.web.dom.selectSingle(web_ui_loading.elementSelector);
}

if (web_ui_loading.element !== null) {
$l.dom.setEvent(global, 'load', web_ui_loading.hide);
$l.dom.setEvent(global, 'beforeunload', web_ui_loading.show);
$l.web.dom.setEvent(global, 'load', web_ui_loading.hide);
$l.web.dom.setEvent(global, 'beforeunload', web_ui_loading.show);

if (localStorage.loadingIndicator !== undefined && localStorage.loadingIndicator == 'true') {
web_ui_loading.show(0);
Expand Down Expand Up @@ -186,7 +186,7 @@ var web_ui_popup = {
defaultTimeout: 500,

createBox: function createBox(id, xclass, message) {
return $l.dom.createElement('DIV', { id: id, 'class': xclass }, message);
return $l.web.dom.createElement('DIV', { id: id, 'class': xclass }, message);
},

msgbox: function msgbox(timeout, message) {
Expand All @@ -195,14 +195,14 @@ var web_ui_popup = {

_larouxWebUiJs2['default'].floatContainer.appendChild(obj);

$l.css.setProperty(obj, { opacity: 1 });
$l.web.css.setProperty(obj, { opacity: 1 });

$l.timers.set({
timeout: timeout,
reset: false,
ontick: function ontick(x) {
// $l.css.setProperty(x, {opacity: 0});
$l.dom.remove(x);
// $l.web.css.setProperty(x, {opacity: 0});
$l.web.dom.remove(x);
},
state: obj
});
Expand Down Expand Up @@ -232,33 +232,33 @@ var web_ui_scrollView = {
selectedElements: [],

onhidden: function onhidden(elements) {
$l.css.setProperty(elements, { opacity: 0 });
$l.css.setTransition(elements, ['opacity']);
$l.web.css.setProperty(elements, { opacity: 0 });
$l.web.css.setTransition(elements, ['opacity']);
},

onreveal: function onreveal(elements) {
$l.css.setProperty(elements, { opacity: 1 });
$l.web.css.setProperty(elements, { opacity: 1 });
},

set: function set(element) {
var elements = $l.getAsArray(element);

for (var i = 0, _length = elements.length; i < _length; i++) {
if (!$l.css.inViewport(elements[i])) {
if (!$l.web.css.inViewport(elements[i])) {
web_ui_scrollView.selectedElements.push(elements[i]);
}
}

web_ui_scrollView.onhidden(web_ui_scrollView.selectedElements);
$l.dom.setEvent(global, 'scroll', web_ui_scrollView.reveal);
$l.web.dom.setEvent(global, 'scroll', web_ui_scrollView.reveal);
},

reveal: function reveal() {
var removeKeys = [],
elements = [];

$l.each(web_ui_scrollView.selectedElements, function (i, element) {
if ($l.css.inViewport(element)) {
if ($l.web.css.inViewport(element)) {
removeKeys.unshift(i);
elements.push(element);
}
Expand All @@ -273,7 +273,7 @@ var web_ui_scrollView = {
}

if (web_ui_scrollView.selectedElements.length === 0) {
$l.dom.unsetEvent(global, 'scroll', web_ui_scrollView.reveal);
$l.web.dom.unsetEvent(global, 'scroll', web_ui_scrollView.reveal);
}

if (elements.length > 0) {
Expand Down

0 comments on commit 7e6a2b9

Please sign in to comment.