history nav is now ok
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
// audio play is handled by edlp_theme
|
||||
|
||||
function init(){
|
||||
console.log('Studio Init');
|
||||
// console.log('Studio Init');
|
||||
initEvents();
|
||||
initStudio();
|
||||
};
|
||||
@@ -35,13 +35,13 @@
|
||||
// | (__| ' \ || | _| / -_) '_| | .` / _ \/ _` / -_) | |__| | ' \| / /(_-<
|
||||
// \___|_||_\_,_|\__|_\___|_| |_|\_\___/\__,_\___| |____|_|_||_|_\_\/__/
|
||||
function initAjaxChutierLinks(){
|
||||
console.log('studio initAjaxChutierLinks');
|
||||
//console.log('studio initAjaxChutierLinks');
|
||||
$('.chutier-ajax-link:not(.ajax-enabled)')
|
||||
.addClass('ajax-enabled')
|
||||
.on('click', onClickChutierAjaxLink);
|
||||
};
|
||||
function onClickChutierAjaxLink(e){
|
||||
console.log('studio onClickAjaxLink chutier');
|
||||
//console.log('studio onClickAjaxLink chutier');
|
||||
e.preventDefault();
|
||||
addRemoveToChutier($(this));
|
||||
return false;
|
||||
@@ -60,7 +60,7 @@
|
||||
});
|
||||
};
|
||||
function onActionToChutierDone($link, data){
|
||||
console.log('onActionToChutierDone',data);
|
||||
//console.log('onActionToChutierDone',data);
|
||||
$('body').trigger({
|
||||
'type':'chutier-action-done',
|
||||
'action_done':data.action_done,
|
||||
@@ -82,7 +82,7 @@
|
||||
// \___\___/_|_|_| .__/\___/__/_|\__|_\___/_||_/__/
|
||||
// |_|
|
||||
function initAjaxCompoLinks(){
|
||||
console.log('studio initAjaxCompoLinks');
|
||||
//console.log('studio initAjaxCompoLinks');
|
||||
$('.new-composition-link:not(.ajax-enabled)')
|
||||
.on('click', onClickNewCompoLink)
|
||||
.addClass('ajax-enabled');
|
||||
@@ -101,7 +101,7 @@
|
||||
// |_| |_|
|
||||
function onClickCompoLink(e){
|
||||
e.preventDefault();
|
||||
console.log('onClickCompoLink');
|
||||
//console.log('onClickCompoLink');
|
||||
openCompo($(this));
|
||||
return false;
|
||||
};
|
||||
@@ -120,7 +120,7 @@
|
||||
});
|
||||
};
|
||||
function onOpenCompoDone(data, $link){
|
||||
console.log('onActionToCompoDone',data);
|
||||
//console.log('onActionToCompoDone',data);
|
||||
$('.composition-link').removeClass('is-active');
|
||||
$link.removeClass('ajax-loading').addClass('is-active');
|
||||
if($('.composition', $composer).length){
|
||||
@@ -163,7 +163,7 @@
|
||||
};
|
||||
function onNewCompoFormSubmit(e, $link, $form){
|
||||
var name = $('input[type="text"]',$form).val();
|
||||
console.log('onNewCompoFormSubmit', name);
|
||||
//console.log('onNewCompoFormSubmit', name);
|
||||
if(name != ''){
|
||||
$form.addClass('ajax-loading').children('*').attr('disabled', 'disabled');
|
||||
createNewCompo(name, $link, $form);
|
||||
@@ -185,7 +185,7 @@
|
||||
});
|
||||
};
|
||||
function onCreateCompoDone(data, $link, $form){
|
||||
console.log('onActionToCompoDone',data);
|
||||
//console.log('onActionToCompoDone',data);
|
||||
var $new_link = $(data.new_link);
|
||||
var $delete_link = $(data.delete_link);
|
||||
$link
|
||||
@@ -225,10 +225,10 @@
|
||||
});
|
||||
};
|
||||
function onDeleteCompoDone(data, $link, $form){
|
||||
console.log('onDeleteCompoDone',data);
|
||||
//console.log('onDeleteCompoDone',data);
|
||||
if(data.status == "ok"){
|
||||
$link.parents('li').remove();
|
||||
console.log("$('.composition-link').length", $('.composition-link').length);
|
||||
//console.log("$('.composition-link').length", $('.composition-link').length);
|
||||
if($('.composition-link').length){
|
||||
openCompo($('.composition-link').eq(0));
|
||||
}else{
|
||||
@@ -365,7 +365,7 @@
|
||||
});
|
||||
}
|
||||
function onOrderChanged(e, ui){
|
||||
console.log('onOrderChanged : e', e);
|
||||
//console.log('onOrderChanged : e', e);
|
||||
var cid = $(e.target).parents('.composition').attr('cid');
|
||||
var documents = {};
|
||||
$('a', e.target).each(function(i) {
|
||||
@@ -376,10 +376,10 @@
|
||||
recordCompoList(cid, documents);
|
||||
};
|
||||
function recordCompoList(cid, docs){
|
||||
console.log('recordCompoList '+cid, docs);
|
||||
//console.log('recordCompoList '+cid, docs);
|
||||
var ajax_path = _settings.save_compo_ajax_url+'/'+cid;
|
||||
var path = window.location.origin + Drupal.url(ajax_path);
|
||||
console.log('path', path);
|
||||
//console.log('path', path);
|
||||
$.getJSON(path, {
|
||||
documents:docs
|
||||
})
|
||||
@@ -394,7 +394,7 @@
|
||||
});
|
||||
}
|
||||
function onRecordCompoDone(data){
|
||||
console.log('onDeleteCompoDone',data);
|
||||
//console.log('onDeleteCompoDone',data);
|
||||
if(data.status == "ok"){
|
||||
}else{
|
||||
console.warn(data.message);
|
||||
|
||||
@@ -25,7 +25,7 @@ edlp_studio.composition_controller_action_ajax:
|
||||
_permission: 'use chutier'
|
||||
|
||||
edlp_studio.studio_ui:
|
||||
path: '/edlp/studio-ui'
|
||||
path: '/studio'
|
||||
defaults:
|
||||
_controller: '\Drupal\edlp_studio\Controller\StudioUIController::StudioUI'
|
||||
_title: 'Studio User Interface'
|
||||
@@ -33,7 +33,7 @@ edlp_studio.studio_ui:
|
||||
_permission: 'use chutier'
|
||||
|
||||
edlp_studio.studio_ui_ajax:
|
||||
path: '/edlp/studio-ui/ajax'
|
||||
path: '/studio/ajax'
|
||||
defaults:
|
||||
_controller: '\Drupal\edlp_studio\Controller\StudioUIController::StudioUIJson'
|
||||
_title: 'Studio User Interface'
|
||||
@@ -41,7 +41,7 @@ edlp_studio.studio_ui_ajax:
|
||||
_permission: 'use chutier'
|
||||
|
||||
edlp_studio.studio_chutier_ui_ajax:
|
||||
path: '/edlp/studio/chutier-ui/ajax'
|
||||
path: '/studio/chutier-ui/ajax'
|
||||
defaults:
|
||||
_controller: '\Drupal\edlp_studio\Controller\StudioUIController::StudioChutierUIJson'
|
||||
_title: 'Chutier of Studio User Interface'
|
||||
|
||||
@@ -51,7 +51,7 @@ class StudioLinkBlock extends BlockBase implements ContainerFactoryPluginInterf
|
||||
public function build() {
|
||||
$build = [];
|
||||
if($this->user->id()){
|
||||
$url = Url::fromRoute('edlp_studio.studio_ui', [], ['absolute' => TRUE]);
|
||||
$url = Url::fromRoute('edlp_studio.studio_ui');
|
||||
$build['edlp_studio_link_block'] = array(
|
||||
'#title' => "Studio",
|
||||
'#type' => 'link',
|
||||
|
||||
Reference in New Issue
Block a user