Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
68af9a34d8
4 changed files with 70 additions and 20 deletions
|
@ -80,7 +80,9 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||||
|
|
||||||
if (Application_Model_Preference::GetPlanLevel() != "disabled"
|
if (Application_Model_Preference::GetPlanLevel() != "disabled"
|
||||||
&& $_SERVER['REQUEST_URI'] != '/Dashboard/stream-player') {
|
&& $_SERVER['REQUEST_URI'] != '/Dashboard/stream-player') {
|
||||||
$view->headScript()->appendFile($baseUrl.'/js/airtime/common/livechat.js','text/javascript');
|
$client_id = Application_Model_Preference::GetClientId();
|
||||||
|
$view->headScript()->appendScript("var livechat_client_id = $client_id;");
|
||||||
|
$view->headScript()->appendFile($baseUrl . '/js/airtime/common/livechat.js', 'text/javascript');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -757,24 +757,6 @@ class ApiController extends Zend_Controller_Action
|
||||||
|
|
||||||
$this->view->status = $status;
|
$this->view->status = $status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the client id assigned by WHMCS from database
|
|
||||||
*/
|
|
||||||
public function liveChatAction() {
|
|
||||||
$this->view->layout()->disableLayout();
|
|
||||||
$this->_helper->viewRenderer->setNoRender(true);
|
|
||||||
|
|
||||||
if(is_null(Zend_Auth::getInstance()->getStorage()->read())) {
|
|
||||||
header('HTTP/1.0 401 Unauthorized');
|
|
||||||
print 'You are not allowed to access this resource.';
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->view->liveChat = array(
|
|
||||||
"client_id"=>Application_Model_Preference::GetClientId()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function registerComponentAction(){
|
public function registerComponentAction(){
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
|
|
|
@ -99,7 +99,40 @@ $(document).ready(function(){
|
||||||
$('.toggle legend').live('click',function() {
|
$('.toggle legend').live('click',function() {
|
||||||
$('.toggle').toggleClass('closed');
|
$('.toggle').toggleClass('closed');
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#Logo").live('change', function(ev){
|
||||||
|
var content, res, logoEl;
|
||||||
|
|
||||||
|
content = $(this).val();
|
||||||
|
res = content.match(/(jpg|jpeg|png|gif)$/gi);
|
||||||
|
logoEl = $("#Logo-element");
|
||||||
|
|
||||||
|
//not an accepted image extension.
|
||||||
|
if (!res) {
|
||||||
|
var ul, li;
|
||||||
|
|
||||||
|
ul = logoEl.find('.errors');
|
||||||
|
li = $("<li/>").append("Image must be one of jpg, jpeg, png, or gif");
|
||||||
|
|
||||||
|
//errors ul has already been created.
|
||||||
|
if (ul.length > 0) {
|
||||||
|
ul.empty()
|
||||||
|
.append(li);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
logoEl
|
||||||
|
.append('<ul class="errors"></ul>')
|
||||||
|
.find(".errors")
|
||||||
|
.append(li);
|
||||||
|
}
|
||||||
|
|
||||||
|
$(this).val("");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
logoEl.find(".errors").remove();
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function resizeImg(ele, targetWidth, targetHeight){
|
function resizeImg(ele, targetWidth, targetHeight){
|
||||||
|
|
|
@ -48,4 +48,37 @@ $(document).ready(function() {
|
||||||
$('.toggle').toggleClass('closed');
|
$('.toggle').toggleClass('closed');
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#Logo").change(function(ev){
|
||||||
|
var content, res, logoEl;
|
||||||
|
|
||||||
|
content = $(this).val();
|
||||||
|
res = content.match(/(jpg|jpeg|png|gif)$/gi);
|
||||||
|
logoEl = $("#Logo-element");
|
||||||
|
|
||||||
|
//not an accepted image extension.
|
||||||
|
if (!res) {
|
||||||
|
var ul, li;
|
||||||
|
|
||||||
|
ul = logoEl.find('.errors');
|
||||||
|
li = $("<li/>").append("Image must be one of jpg, jpeg, png, or gif");
|
||||||
|
|
||||||
|
//errors ul has already been created.
|
||||||
|
if (ul.length > 0) {
|
||||||
|
ul.empty()
|
||||||
|
.append(li);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
logoEl
|
||||||
|
.append('<ul class="errors"></ul>')
|
||||||
|
.find(".errors")
|
||||||
|
.append(li);
|
||||||
|
}
|
||||||
|
|
||||||
|
$(this).val("");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
logoEl.find(".errors").remove();
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue