From 1c5685d68f1b73270fb814fe04cbb490eb90ba5f Mon Sep 17 00:00:00 2001
From: mensonge
Date: Fri, 14 Nov 2008 15:39:19 +0000
Subject: Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN
(online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
---
includes/js/dojox/dtl/tests/html/tag.js | 233 --------------------------------
1 file changed, 233 deletions(-)
delete mode 100644 includes/js/dojox/dtl/tests/html/tag.js
(limited to 'includes/js/dojox/dtl/tests/html/tag.js')
diff --git a/includes/js/dojox/dtl/tests/html/tag.js b/includes/js/dojox/dtl/tests/html/tag.js
deleted file mode 100644
index c964913..0000000
--- a/includes/js/dojox/dtl/tests/html/tag.js
+++ /dev/null
@@ -1,233 +0,0 @@
-if(!dojo._hasResource["dojox.dtl.tests.html.tag"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.dtl.tests.html.tag"] = true;
-dojo.provide("dojox.dtl.tests.html.tag");
-
-dojo.require("dojox.dtl.html");
-dojo.require("dojox.dtl.Context");
-dojo.require("dojox.dtl.tests.html.util");
-
-doh.register("dojox.dtl.html.tag",
- [
- function test_errors(t){
- var dd = dojox.dtl;
- var template;
-
- // No root node after rendering
- var found = false;
- try {
- template = new dd.HtmlTemplate('No div');
- dd.tests.html.util.render(template);
- }catch(e){
- t.is("Text should not exist outside of the root node in template", e.message);
- found = true;
- }
- t.t(found);
-
- var context = new dojox.dtl.Context({test: "Pocket"});
- found = false;
- try {
- template = new dd.HtmlTemplate('{{ test }}');
- dd.tests.html.util.render(template, context);
- }catch(e){
- t.is("Text should not exist outside of the root node in template", e.message);
- found = true;
- }
- t.t(found);
-
- template = new dd.HtmlTemplate('
extra content');
- found = false;
- try {
- dd.tests.html.util.render(template);
- }catch(e){
- t.is("Content should not exist outside of the root node in template", e.message);
- found = true;
- }
- t.t(found);
-
- // More than one top-level node (except for blocks)
- template = new dd.HtmlTemplate('');
- found = false;
- try {
- dd.tests.html.util.render(template);
- }catch(e){
- t.is("Content should not exist outside of the root node in template", e.message);
- found = true;
- }
- t.t(found);
-
- // Logic block rules out any root node
- template = new dd.HtmlTemplate('{% if missing %}{% endif %}');
- found = false;
- try {
- dd.tests.html.util.render(template);
- }catch(e){
- t.is("Rendered template does not have a root node", e.message);
- found = true;
- }
- t.t(found);
- },
- function test_structures(t){
- var dd = dojox.dtl;
-
- var context = new dd.Context({
- actions: ["ate", "picked"],
- items: [
- {
- name: "apple"
- },
- {
- name: "banana",
- date: new Date(2007, 2, 16, 14, 30, 10)
- },
- {
- name: "orange",
- date: new Date(2008, 0, 1, 12, 0, 0)
- }
- ]
- });
-
- var template = new dd.HtmlTemplate('
I {% for action in actions %}{% if not forloop.first %}, {% endif %}{{action}}{% endfor %} the following:
{% for item in items %}
{{ item.name }}{% if item.date %} at {{ item.date|date:"P" }}{% endif %}
{% endfor %}
');
- t.is('
I ate, picked the following:
apple
banana at 2:30 pm
orange at noon
', dd.tests.html.util.render(template, context));
- },
- function test_tag_extend(t){
- // Problems to look for:
- // * Content outside of blocks
- },
- function test_tag_for(t){
- var dd = dojox.dtl;
-
- var context = new dd.Context({
- items: ["apple", "banana", "lemon"]
- });
- var template = new dd.HtmlTemplate('
{% for item in items %}
{{ item }}
{% endfor %}
');
-
- t.is('
apple
banana
lemon
', dd.tests.html.util.render(template, context));
-
- // The line break is there to make sure our regex works
- template = new dd.HtmlTemplate('');
-
- t.is('', dd.tests.html.util.render(template, context));
- },
- function test_tag_if(t){
- var dd = dojox.dtl;
-
- var context = new dd.Context({key: true});
- var template = new dd.HtmlTemplate('{% if key %}