some documentation

remotes/origin/1203
pavel 11 years ago
parent 76e62fb411
commit 5027466494
  1. 30
      templates/client/static_client/js/_modules/block.common.js
  2. 50
      templates/client/static_client/js/_modules/page.about.js

@ -5,13 +5,33 @@ if (EXPO.common){
}else {
EXPO.common = (function () {
// variables
/**
* private (visible inside this module only) variables
*/
/**
* @type {Object} - module API interafce realization
*/
var that = {};
/**
* helper for this.children
* @param {HTMLElement} el
* @param selector
* @returns {*}
*/
var matches = function(el, selector) {
return (el.matches || el.matchesSelector || el.msMatchesSelector || el.mozMatchesSelector || el.webkitMatchesSelector || el.oMatchesSelector).call(el, selector);
};
/**
* @type {Object} default setting
*/
that.opt = {}; //свойства по умолчанию
// Валидация форм, каждый объект содержит поля объектов формы и методы работы с формой
/**
* Form validation mechanism
* @param {*|jQuery|HTMLElement} obj - particualr form
* @constructor
*/
var Validation = function(obj){
//поля над которыми проводится валидация
this.fields = [];
@ -174,9 +194,11 @@ if (EXPO.common){
$("input[type='checkbox'], input[type='radio']").customRadioCheck();
// add to calendar button click event functional
});
// methods
//инициализация общих свойств
/**
* current module general initialization
* @param {Object} options - options recieved from web page view
*/
that.init = function (options) {
$.extend(this.opt, options);
var self = this,

@ -3,21 +3,51 @@ if (EXPO.about) {
console.warn('WARNING: EXPO.eventsFeed is already defined!');
} else {
EXPO.about = (function () {
// variables
/**
* private (visible inside this module only) variables
*/
/**
* @type {Object} - module API interafce realization
*/
var that = {};
//default module setting
/**
* @type {Object} default setting
*/
that.opt = {};
//dependence's
/**
* dependencies.Place where you can switch on dependencies for module
* @type {EXPO.common|*} - mostly used in project functions and data (block.common.js)
*/
var com = EXPO.common;
//private
/**
* tabs object constructor
* @param options - options (id's and classes to specifie HTML elements)
* @constructor
*/
var Tabs = function (options) {
this.opt = options;
var self = this,
opt = this.opt,
tabClass = opt.tabClass,
activeClass = opt.activeClass;
/**
* tabs navigation menu
* @type {*|jQuery|HTMLElement}
* @public
*/
this.$tabsList = $('#'+opt.listId);
/**
* tabs body container
* @type {*|jQuery|HTMLElement}
* @public
*/
this.$tabs = $('#'+opt.tabsId);
/**
* short peview for content of each tabs
* @type {*|jQuery|HTMLElement}
* @public
*/
this.$tabsOpenings = $('#'+opt.tabsOpeningId);
$('a',this.$tabsList).on('click', function () {
@ -31,9 +61,11 @@ if (EXPO.about) {
};
Tabs.prototype = {
initTabs: function () {
},
/**
* make specified tab visible
* @param tabId - tab DOM id pararmeter
* @public
*/
setActive: function (tabId) {
var activeClass = this.opt.activeClass,
tabClass = this.opt.tabClass,
@ -47,6 +79,10 @@ if (EXPO.about) {
}
};
/**
* current module general initialization
* @param {Object} options - options recieved from web page view
*/
that.init = function (options) {
// settings extending
$.extend(this.opt, options);

Loading…
Cancel
Save