| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- /**
- * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * CC-BY License - http://creativecommons.org/licenses/by/3.0/
- *
- * @defgroup DolphinStudio Dolphin Studio
- * @{
- */
- function BxDolStudioModule(oOptions) {
- this.sActionsUrl = oOptions.sActionUrl;
- this.sObjName = oOptions.sObjName == undefined ? 'oBxDolStudioModule' : oOptions.sObjName;
- this.sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'fade' : oOptions.sAnimationEffect;
- this.iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
- }
- BxDolStudioModule.prototype.activate = function(sName, oChecbox) {
- var $this = this;
- var oDate = new Date();
- $.get(
- this.sActionsUrl,
- {
- mod_action: 'activate',
- mod_value: sName,
- _t:oDate.getTime()
- },
- function(oData) {
- if(oData.code != 0) {
- alert(oData.message);
- $(oChecbox).attr('checked', 'checked').trigger('enable');
- return;
- }
- var oBg = $('.bx-std-page-bg');
- var oContent = $('#bx-std-page-columns');
- if(oData.content.length > 0) {
- oBg.removeClass('bx-std-page-bg-empty');
- oContent.html(oData.content).bx_anim('show', $this.sAnimationEffect, $this.iAnimationSpeed);
- }
- else
- oContent.bx_anim('hide', $this.sAnimationEffect, $this.iAnimationSpeed, function() {
- $(this).html(oData.content)
- oBg.addClass('bx-std-page-bg-empty');
- });
- },
- 'json'
- );
- return true;
- };
- /** @} */
|