started second cartel of audio player
This commit is contained in:
@@ -105,6 +105,7 @@
|
||||
console.log('AudioPlayer node loaded', data);
|
||||
this.$cartel.html(data.rendered);
|
||||
this.$cartel.removeClass('loading');
|
||||
initAjaxLinks();
|
||||
},
|
||||
onNodeLoadFail(jqxhr, textStatus, error){
|
||||
console.warn('AudioPlayer node load failed', jqxhr.responseText);
|
||||
@@ -215,20 +216,16 @@
|
||||
_$ajaxLinks = $('.ajax-link:not(.ajax-enabled)')
|
||||
.each(function(i,e){
|
||||
var $this = $(this);
|
||||
|
||||
// avoid already ajaxified links
|
||||
// if($this.is('.ajax-enable')) return;
|
||||
|
||||
var sys_path = $this.attr('data-drupal-link-system-path');
|
||||
if(sys_path){
|
||||
// convert node link to edlp_ajax_node module links
|
||||
m = sys_path.match(/^\/?(node\/\d+)$/g);
|
||||
if(m) $this.attr('data-drupal-link-system-path', 'edlp/'+m[0]);
|
||||
$this.on('click', onClickAjaxLink).addClass('ajax-enable');
|
||||
}
|
||||
$this.on('click', onClickAjaxLink).addClass('ajax-enable');
|
||||
})
|
||||
|
||||
;
|
||||
});
|
||||
};
|
||||
|
||||
function onClickAjaxLink(e){
|
||||
@@ -247,10 +244,12 @@
|
||||
var path = window.location.origin + drupalSettings.path.baseUrl + sys_path;
|
||||
_$body.addClass('ajax-loading');
|
||||
$link.addClass('ajax-loading');
|
||||
// $.getJSON(path, {}, function(data){
|
||||
// onAjaxLinkLoaded(data, $link, sys_path);
|
||||
// });
|
||||
$.getJSON(path+'/ajax', {})
|
||||
// check for viewmode attribute
|
||||
path += '/ajax';
|
||||
if($link.attr('viewmode') != ''){
|
||||
path += '/'+$link.attr('viewmode');
|
||||
}
|
||||
$.getJSON(path, {})
|
||||
.done(function(data){
|
||||
onAjaxLinkLoaded(data, $link, sys_path);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user