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
15 changed files
with
565 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?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"); | ||
require_once(BX_DIRECTORY_PATH_INC . "utils.inc.php"); | ||
|
||
bx_import('BxDolLanguages'); | ||
|
||
$sObject = bx_process_input(bx_get('o')); | ||
$sDisplay = bx_process_input(bx_get('d')); | ||
$sAction = bx_process_input(bx_get('a')); | ||
if(!empty($sAction)) | ||
$sAction = 'performAction' . bx_gen_method_name($sAction); | ||
|
||
// try to create form object and call its method | ||
if(!empty($sObject) && !empty($sDisplay) && !empty($sAction)) { | ||
$oForm = BxTemplFormView::getObjectInstance($sObject, $sDisplay); | ||
if($oForm && method_exists($oForm, $sAction)) | ||
$oForm->$sAction(); | ||
} | ||
|
||
/** @} */ |
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,60 @@ | ||
/** | ||
* Copyright (c) UNA, Inc - https://una.io | ||
* MIT License - https://opensource.org/licenses/MIT | ||
* | ||
* @defgroup UnaCore UNA Core | ||
* @{ | ||
*/ | ||
|
||
function BxDolForm(oOptions) | ||
{ | ||
if(typeof oOptions === 'undefined') | ||
return; | ||
|
||
this._sObjName = oOptions.sObjName === undefined ? 'oForm' : oOptions.sObjName; // javascript object name, to run current object instance from onTimer | ||
this._sObject = oOptions.sObject; // form object | ||
this._sDisplay = oOptions.sDisplay; // form display | ||
|
||
this._sActionsUri = 'form.php'; | ||
this._sActionsUrl = oOptions.sRootUrl + this._sActionsUri; // actions url address | ||
|
||
this._sAnimationEffect = 'fade'; | ||
this._iAnimationSpeed = 'slow'; | ||
this._aHtmlIds = oOptions.aHtmlIds; | ||
} | ||
|
||
BxDolForm.prototype.pgcTogglePopup = function(oLink, iInputId, sPrivacyObject) | ||
{ | ||
var oData = this._getDefaultParams(); | ||
oData['a'] = 'get_privacy_group_chooser'; | ||
oData['input_id'] = iInputId; | ||
oData['privacy_object'] = sPrivacyObject; | ||
|
||
$(oLink).dolPopupAjax({ | ||
id: this._aHtmlIds['pgc_popup'] + iInputId, | ||
url: bx_append_url_params(this._sActionsUri, oData), | ||
closeOnOuterClick: false, | ||
removeOnClose: true, | ||
}); | ||
}; | ||
|
||
BxDolForm.prototype.pgcOnSelectGroup = function(oData) | ||
{ | ||
if(oData && parseInt(oData.code) != 0) | ||
return; | ||
|
||
if(oData.form_id && oData.chooser_id && oData.icon) | ||
$('#' + oData.form_id + ' #' + oData.chooser_id + ' .bx-form-input-pgc-current .sys-icon').removeClass().addClass('sys-icon ' + oData.icon); | ||
}; | ||
|
||
BxDolForm.prototype._getDefaultParams = function() | ||
{ | ||
var oDate = new Date(); | ||
return { | ||
o: this._sObject, | ||
d: this._sDisplay, | ||
_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
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
Oops, something went wrong.