Commit bacbbde0 authored by saurabh's avatar saurabh Committed by GitHub

Merge pull request #1604 from katkamrachana/alpha-dev

BlockUI for ajax processing screen
parents 07401e0c 8fd529d1
......@@ -177,6 +177,8 @@
$(document).foundation();
// Register global ajax start and complete events to show ajax loader when request is in process
$(document).ajaxStart($.blockUI).ajaxStop($.unblockUI);
/*
$(document)
.ajaxStart(function() {
$('article').block({
......@@ -203,6 +205,7 @@
.ajaxStop(function() {
$('article').unblock();
});
*/
// Toggles the display of main sidebar for 12 col article view
var toggleMainSidebar = function(){
......
......@@ -96,7 +96,7 @@
break;
}
}
collapse_tree(node);
// collapse_tree(node);
var nav_list = parent_arr.reverse();
if(node['node_type']!="CourseSectionEvent" && node['node_type']!="CourseSubSectionEvent" && node['node_type']!="CourseUnitEvent" && node['node_type']!="CourseSection" && node['node_type']!="CourseSubSection" && node['node_type']!="CourseUnit" && update_url){
// alert(nav_list);
......@@ -112,14 +112,16 @@
nod_type: node_type
// csrfmiddlewaretoken: '{{ csrf_token }}'
},
/*
beforeSend: function ( ) {
$("#processing_screen_ModalLabel").text("Please wait");
$("#processing_screen_Modal").foundation('reveal', 'open');
},
},*/
success: function(data) {
/*
$("#processing_screen_Modal").removeClass("alert");
$("#processing_screen_Modal").foundation('reveal', 'close');
*/
if (node_type == "Group"){
window.history.pushState("", "", "/{{group_name_tag}}/"+"?selected="+node.id+"");
}
......@@ -176,7 +178,7 @@
}
else{
var close_nele = event.previous_node
unselect_treenode(close_nele)
// unselect_treenode(close_nele)
}
});
......
......@@ -9,7 +9,7 @@
{% check_is_gstaff groupid request.user as is_gstaff %}
{#% get_gstudio_facebook_app_id as fb_app_id %#}
{% get_gstudio_social_share_resource as social_share %}
{% if social_share == "True" %}
{% if social_share %}
<script type="text/javascript" src="/static/ndf/bower_components/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="/static/ndf/bower_components/ckeditor/config.js"></script>
<script type="text/javascript">
......
......@@ -79,10 +79,11 @@
</a>
</div>
{% endif %}
<div id="view_collection">
{% include "ndf/collection_ajax_view.html" %}
</div>
{% if node.collection_set %}
<div id="view_collection">
{% include "ndf/collection_ajax_view.html" %}
</div>
{% endif %}
{% if not 'video' in node.if_file.mime_type and not is_group %}
<dl class="accordion" data-accordion>
<dd class="accordion-navigation" data-options="deep_linking:true">
......
......@@ -94,11 +94,9 @@
{% trans "Create New " %} {{title}} :
{% endif %}
{% endif %}
{% comment %}
<span class="right">
<a class="tiny button radius existing-template">{% trans "Create page from existing template" %}</a>
</span>
{% endcomment %}
</span></h3>
<input tabindex="1" id="name_id" name="name" type="text" value="{{node.name}}" placeholder="Give the {{title}} a name.." {% if node.group_type %}disabled=disabled{% endif %} required>
......
{% load i18n %}
{% load cache %}
{% load ndf_tags %}
{% block head %}
<style type="text/css">
.box{
display: none;
width: 10%!important;
height: 10%!important;
}
a:hover + .box,.box:hover{
display: block;
position: relative;
z-index: 100;
}
</style>
{% endblock %}
{% block related_content %}
{% endblock %}
{% block body_content %}
<ul class="small-block-grid-1 medium-block-grid-3 large-block-grid-6" >
{% for each in templates_cur %}
<li class="template-list">
<div class="templates-div" data-content="{{each.content}}">
{{each.name}}
</div>
</li>
{% endfor %}
</ul>
{% endblock %}
<script type="text/javascript">
$(".template-list").click(function(event){
var content = $(this).children('div').attr("data-content");
CKEDITOR.instances['ckeditor_textarea'].insertHtml(content);
$('#group_imgs_on_modal').foundation('reveal', 'close');
});
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment