$plugindiv.closest('.need-spin').spin(false);
if (rows.length == 0) {
- if (use_datatables) datatables_set_message ($table, $tbody, myslice_warning("No result"));
- else regular_set_message ($table, $tbody, myslice_warning("No result"));
+ if (use_datatables) datatables_set_message ($table, $tbody, unfold.warning("No result"));
+ else regular_set_message ($table, $tbody, unfold.warning("No result"));
return;
}
if (typeof rows[0].error != 'undefined') {
var error="ERROR: " + rows[0].error;
- if (use_datatables) datatables_set_message ($table, $tbody, myslice_error(error));
- else regular_set_message ($table, $tbody, myslice_error(error));
+ if (use_datatables) datatables_set_message ($table, $tbody, unfold.error(error));
+ else regular_set_message ($table, $tbody, unfold.error(error));
return;
}
var options = $plugindiv.data().SimpleList;
'js_files' : [ "js/simplelist.js",
"js/manifold.js", "js/manifold-query.js",
"js/spin.presets.js", "js/spin.min.js", "js/jquery.spin.js",
- "js/myslice.js",
+ "js/unfold-helper.js",
] ,
'css_files': [ "css/simplelist.css" ],
}
# variables that will get passed to the view-plugin.html template
template_env = {}
- # define 'content_main' to the template engine
- template_env [ 'content_main' ] = main_plugin.render(request)
+ # define 'unfold1_main' to the template engine
+ template_env [ 'unfold1_main' ] = main_plugin.render(request)
# more general variables expected in the template
template_env [ 'title' ] = 'Test view for a full request cycle'
query=slices_query,
)
# likewise but on the side view
- template_env [ 'content_related' ] = related_plugin.render (request)
+ template_env [ 'unfold1_margin' ] = related_plugin.render (request)
# add our own css in the mix
page.add_css_files ( 'css/dashboard.css')
title='QuickFilter in main content',
criterias=quickfilter_criterias,
) ] )
- # define 'content_main' to the template engine
- template_env [ 'content_main' ] = main_plugin.render(request)
+ # define 'unfold1_main' to the template engine
+ template_env [ 'unfold1_main' ] = main_plugin.render(request)
##########
related_plugin = StaticList (page=page,
list=hard_wired_slice_names,
header='Slices')
# likewise but on the side view
- template_env [ 'content_related' ] = related_plugin.render (request)
+ template_env [ 'unfold1_margin' ] = related_plugin.render (request)
# more general variables expected in the template
template_env [ 'title' ] = 'Test Plugin View'
'topmenu_items' : topmenu_items('slice',request),
'username':the_user (request),
'slices': hard_wired_slice_names,
- 'content_main' : lorem,
+ 'unfold1_main' : lorem,
},
context_instance=RequestContext(request))
-{% extends 'layout-myslice.html' %}
+{% extends 'layout-unfold1.html' %}
-{% block content_main %}
-{{ content_main|safe }}
-{% endblock content_main %}
+{% block unfold1_main %}
+{{ unfold1_main|safe }}
+{% endblock unfold1_main %}
-{% block content_related %}
-{{ content_related|safe }}
-{% endblock content_related %}
+{% block unfold1_margin %}
+{{ unfold1_margin|safe }}
+{% endblock unfold1_margin %}
-{% extends 'layout-myslice.html' %}
+{% extends 'layout-unfold1.html' %}
-{% block content_main %}
+{% block unfold1_main %}
{% insert_str prelude "css/sample.css" %}
<div id='scrollDiv3'> scroll3 area {{ lorem }} </div>
<div id='scrollDiv4'> scroll4 area {{ lorem }} {{ lorem }} {{ lorem }} </div>
<!--</div>-->
-{% endblock content_main %}
+{% endblock unfold1_main %}
-{% block content_related %}
+{% block unfold1_margin %}
<div class="foo">
<ul class="nav nav-tabs nav-stacked">
<li><a href="#scrollDiv1" data-toggle="tab"><!--<i class="icon-chevron-right"/>--> scroll1 </a></li>
<li><a href="#scrollDiv4" data-toggle="tab"> scroll4 </a></li>
</ul>
</div>
-{% endblock content_related %}
+{% endblock unfold1_margin %}
{# -*-django-html-mumamo-mode-*- #}
-{% extends 'layout-myslice.html' %}
+{% extends 'layout-unfold1.html' %}
-{% block content_main %}
+{% block unfold1_main %}
{% if name %}
<p class='well'>We're getting the variable <code>name= {{ name }}</code> from the URL </p>
{% else %}
<p class='well'>This URL is not valid, you need to pass a slice name like in <a href="/slice/my.slice.name">/slice/my.slice.name</a></p>
{% endif %}
-{% endblock content_main %}
+{% endblock unfold1_main %}
-{% extends 'layout-myslice.html' %}
+{% extends 'layout-unfold1.html' %}
-{% block content_main %}
+{% block unfold1_main %}
{% insert_str prelude "css/sample.css" %}
{% insert prelude_js %}
</div>
</div>
+<p>Let's see what a <button class='unfold-warning btn btn-warning'>warning button</button> looks like.</p>
<div class='well'> a sample of the 'well' class quis nostrud exercitation </div>
decima et quinta decima. Eodem modo typi, qui nunc nobis videntur
parum clari, fiant sollemnes in futurum.
</div>
-{% endblock content_main %}
+{% endblock unfold1_main %}
-{% block content_related %}
+{% block unfold1_margin %}
This text is shorter on purpose Lorem <span class='bold'>ipsum
dolor</span> sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation
ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo
consequat.
-{% endblock content_related %}
+{% endblock unfold1_margin %}
--- /dev/null
+var unfold = {
+ warning:function(text){
+ return "<button class='unfold-warning btn btn-warning'>"+text+"</button>";
+ },
+ error : function(text){
+ return "<button class='unfold-error btn btn-error'>"+text+"</button>";
+ },
+} // global unfold
# env['js_chunks']= '\n'.join(self.js_chunks)
# env['css_chunks']='\n'.join(self.css_chunks)
# return env
- # together with this in layout-myslice.html
+ # together with this in layout-unfold1.html
# {% for js_file in js_files %} {% insert_str prelude js_file %} {% endfor %}
# {% for css_file in css_files %} {% insert_str prelude css_file %} {% endfor %}
# somehow however this would not work too well,
--- /dev/null
+/* this relates to the unfold-layout1 template */
+#unfold1-main {
+}
+#unfold1-margin {
+ padding: 10;
+ background-color: #fff2ff;
+}
+++ /dev/null
-#content-main {
-}
-#content-related {
- padding: 10;
- background-color: #fff2ff;
-}
-span.myslice-warning { background-color: orange; }
-span.myslice-error { background-color: red; }
+++ /dev/null
-function myslice_warning(text){ return "<span class='myslice-warning'>"+text+"</span>"; }
-function myslice_error(text){ return "<span class='myslice-error'>"+text+"</span>"; }
{{ header_prelude }}
</head>{# let's add these ones no matter what #}
{% insert_str prelude "js/jquery.js" %}
-{# {% insert prelude_js %} jQuery.noConflict(); {% endinsert %} #}
{% insert_str prelude "js/init-all-plugins.js" %}
-{% insert_str prelude "css/myslice.css" %}
+{% insert_str prelude "css/layout-unfold1.css" %}
<body>
{% block container %}
<div id="container">
{% endblock topmenu %}
<div class="container-fluid">
<div class="row-fluid">
- <div id="content-main" class="span9 columns">
- {% block content_main %}
- "The main content area (define block 'content_main')"
- {% endblock content_main %}
+ <div id="unfold1-main" class="span9 columns">
+ {% block unfold1_main %}
+ "The main content area (define block 'unfold1_main')"
+ {% endblock unfold1_main %}
</div><!--span9-->
- <div id='content-related' class='span3'>
- {% block content_related %}
+ <div id='unfold1-margin' class='span3'>
+ {% block unfold1_margin %}
"The related content area (define block 'related_main')"
- {% endblock content_related %}
+ {% endblock unfold1_margin %}
</div><!--span3-->
</div><!--raw-fluid-->
</div><!--container-fluid-->
-{% extends 'layout-myslice.html' %}
+{% extends 'layout-unfold1.html' %}
-{% block content_related %}
+{% block unfold1_margin %}
{% include 'widget-login.html' %}
-{% endblock content_related %}
+{% endblock unfold1_margin %}
-{% block content_main %}
+{% block unfold1_main %}
<code> This page is currently connected to two authentication systems:</code>
<ul>
<li> A manifold server, located at <code>{{ manifold_url }}</code>, (configured in <code>myslice/config.py</code>), and</li>
{% endfor %}
</ul>
</li></ul>
-{% endblock content_main %}
+{% endblock unfold1_main %}
-{% extends 'layout-myslice.html' %}
+{% extends 'layout-unfold1.html' %}
-{% block content_main %}
+{% block unfold1_main %}
{% include 'widget-logout.html' %}
{% endblock %}