forked from unacms/una
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
24 changed files
with
759 additions
and
103 deletions.
There are no files selected for viewing
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
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
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,91 @@ | ||
/** | ||
* Copyright (c) UNA, Inc - https://una.io | ||
* MIT License - https://opensource.org/licenses/MIT | ||
* | ||
* @defgroup UnaCore UNA Core | ||
* @{ | ||
*/ | ||
|
||
function BxDolLabel(oOptions) { | ||
this._sObjName = oOptions.sObjName == undefined ? 'oBxDolLabel' : oOptions.sObjName; | ||
|
||
this._sRootUrl = oOptions.sRootUrl == undefined ? sUrlRoot : oOptions.sRootUrl; | ||
this._sActionsUrl = this._sRootUrl + 'label.php'; // actions url address | ||
|
||
this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'fade' : oOptions.sAnimationEffect; | ||
this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed; | ||
this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds; | ||
|
||
this._sClassItem = 'sys-labels-list-item'; | ||
this._sClassSublist = 'sys-labels-li-sublist'; | ||
} | ||
|
||
// TODO: Continue from here: preload selected. | ||
BxDolLabel.prototype.selectLabels = function(oElement, aParams) | ||
{ | ||
var $this = this; | ||
|
||
var aValue = new Array(); | ||
$(oElement).find('input:hidden').each(function() { | ||
aValue.push($(this).val()); | ||
}); | ||
|
||
var oData = $.extend({}, $this._getDefaultParams(), {action: 'select_labels', value: aValue}, (aParams || {})); | ||
|
||
this._loadingInFormElement(oElement, true); | ||
|
||
$.get( | ||
this._sActionsUrl, | ||
oData, | ||
function(oData) { | ||
$this._loadingInFormElement(oElement, false); | ||
|
||
processJsonData(oData); | ||
}, | ||
'json' | ||
); | ||
}; | ||
|
||
BxDolLabel.prototype.onSelectLabels = function(oData) | ||
{ | ||
if(oData.content != undefined) | ||
$('#' + this._aHtmlIds['labels_element']).replaceWith(oData.content); | ||
}; | ||
|
||
BxDolLabel.prototype.showSublist = function(oLink) | ||
{ | ||
$(oLink).find('.sys-icon').toggleClass('chevron-down').toggleClass('chevron-up').parents('.' + this._sClassItem + ':first').find('.' + this._sClassSublist + ':first').bx_anim('toggle', this._sAnimationEffect, this._iAnimationSpeed); | ||
}; | ||
|
||
BxDolLabel.prototype._loading = function(e, bShow) | ||
{ | ||
var oParent = $(e).length ? $(e) : $('body'); | ||
bx_loading(oParent, bShow); | ||
}; | ||
|
||
BxDolLabel.prototype._loadingInBlock = function(e, bShow) | ||
{ | ||
var oParent = $(e).length ? $(e).parents('.bx-db-content:first') : $('body'); | ||
bx_loading(oParent, bShow); | ||
}; | ||
|
||
BxDolLabel.prototype._loadingInFormElement = function(e, bShow) | ||
{ | ||
var oParent = $(e).length ? $(e).parents('.bx-form-element:first') : $('body'); | ||
bx_loading(oParent, bShow); | ||
}; | ||
|
||
BxDolLabel.prototype._getSelectLabelsElement = function() | ||
{ | ||
return $('#' + this._aHtmlIds['form'] + ' #' + this._aHtmlIds['labels_element'] + ' input'); | ||
}; | ||
|
||
BxDolLabel.prototype._getDefaultParams = function() | ||
{ | ||
var oDate = new Date(); | ||
return { | ||
_t: oDate.getTime() | ||
}; | ||
}; | ||
|
||
/** @} */ |
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
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,28 @@ | ||
<?php | ||
/** | ||
* Copyright (c) UNA, Inc - https://una.io | ||
* MIT License - https://opensource.org/licenses/MIT | ||
* | ||
* @defgroup UnaCore UNA Core | ||
* @{ | ||
*/ | ||
|
||
require_once('./inc/header.inc.php'); | ||
require_once(BX_DIRECTORY_PATH_INC . "design.inc.php"); | ||
|
||
bx_import('BxDolLanguages'); | ||
|
||
check_logged(); | ||
|
||
$sAction = isset($_REQUEST['action']) && preg_match ('/^[A-Za-z_-]+$/', $_REQUEST['action']) ? bx_process_input($_REQUEST['action']) : ''; | ||
|
||
$oLabel = BxDolLabel::getInstance(); | ||
|
||
if($oLabel && $sAction) { | ||
header('Content-Type: text/html; charset=utf-8'); | ||
$sMethod = 'action' . bx_gen_method_name($sAction); | ||
if(method_exists($oLabel, $sMethod)) | ||
echo $oLabel->$sMethod(); | ||
} | ||
|
||
/** @} */ |
17 changes: 17 additions & 0 deletions
17
modules/boonex/decorous/data/template/system/scripts/BxTemplLabel.php
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,17 @@ | ||
<?php defined('BX_DOL') or die('hack attempt'); | ||
/** | ||
* Copyright (c) UNA, Inc - https://una.io | ||
* MIT License - https://opensource.org/licenses/MIT | ||
* | ||
* @defgroup UnaTemplate UNA Template Classes | ||
* @{ | ||
*/ | ||
|
||
/** | ||
* @see BxDolLabel | ||
*/ | ||
class BxTemplLabel extends BxBaseLabel | ||
{ | ||
} | ||
|
||
/** @} */ |
14 changes: 14 additions & 0 deletions
14
modules/boonex/decorous/data/template/system/scripts/BxTemplLabelForm.php
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,14 @@ | ||
<?php defined('BX_DOL') or die('hack attempt'); | ||
/** | ||
* Copyright (c) UNA, Inc - https://una.io | ||
* MIT License - https://opensource.org/licenses/MIT | ||
* | ||
* @defgroup UnaTemplate UNA Template Classes | ||
* @{ | ||
*/ | ||
|
||
class BxTemplLabelForm extends BxBaseLabelForm | ||
{ | ||
} | ||
|
||
/** @} */ |
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
17 changes: 17 additions & 0 deletions
17
modules/boonex/lucid/data/template/system/scripts/BxTemplLabel.php
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,17 @@ | ||
<?php defined('BX_DOL') or die('hack attempt'); | ||
/** | ||
* Copyright (c) UNA, Inc - https://una.io | ||
* MIT License - https://opensource.org/licenses/MIT | ||
* | ||
* @defgroup UnaTemplate UNA Template Classes | ||
* @{ | ||
*/ | ||
|
||
/** | ||
* @see BxDolLabel | ||
*/ | ||
class BxTemplLabel extends BxBaseLabel | ||
{ | ||
} | ||
|
||
/** @} */ |
14 changes: 14 additions & 0 deletions
14
modules/boonex/lucid/data/template/system/scripts/BxTemplLabelForm.php
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,14 @@ | ||
<?php defined('BX_DOL') or die('hack attempt'); | ||
/** | ||
* Copyright (c) UNA, Inc - https://una.io | ||
* MIT License - https://opensource.org/licenses/MIT | ||
* | ||
* @defgroup UnaTemplate UNA Template Classes | ||
* @{ | ||
*/ | ||
|
||
class BxTemplLabelForm extends BxBaseLabelForm | ||
{ | ||
} | ||
|
||
/** @} */ |
17 changes: 17 additions & 0 deletions
17
modules/boonex/ocean/data/template/system/scripts/BxTemplLabel.php
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,17 @@ | ||
<?php defined('BX_DOL') or die('hack attempt'); | ||
/** | ||
* Copyright (c) UNA, Inc - https://una.io | ||
* MIT License - https://opensource.org/licenses/MIT | ||
* | ||
* @defgroup UnaTemplate UNA Template Classes | ||
* @{ | ||
*/ | ||
|
||
/** | ||
* @see BxDolLabel | ||
*/ | ||
class BxTemplLabel extends BxBaseLabel | ||
{ | ||
} | ||
|
||
/** @} */ |
14 changes: 14 additions & 0 deletions
14
modules/boonex/ocean/data/template/system/scripts/BxTemplLabelForm.php
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,14 @@ | ||
<?php defined('BX_DOL') or die('hack attempt'); | ||
/** | ||
* Copyright (c) UNA, Inc - https://una.io | ||
* MIT License - https://opensource.org/licenses/MIT | ||
* | ||
* @defgroup UnaTemplate UNA Template Classes | ||
* @{ | ||
*/ | ||
|
||
class BxTemplLabelForm extends BxBaseLabelForm | ||
{ | ||
} | ||
|
||
/** @} */ |
17 changes: 17 additions & 0 deletions
17
modules/boonex/protean/data/template/system/scripts/BxTemplLabel.php
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,17 @@ | ||
<?php defined('BX_DOL') or die('hack attempt'); | ||
/** | ||
* Copyright (c) UNA, Inc - https://una.io | ||
* MIT License - https://opensource.org/licenses/MIT | ||
* | ||
* @defgroup UnaTemplate UNA Template Classes | ||
* @{ | ||
*/ | ||
|
||
/** | ||
* @see BxDolLabel | ||
*/ | ||
class BxTemplLabel extends BxBaseLabel | ||
{ | ||
} | ||
|
||
/** @} */ |
Oops, something went wrong.