Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
138
Merge Requests
138
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
f8c832bc
Commit
f8c832bc
authored
Sep 04, 2014
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
live_test: improve syntax of javascript code used for live tests
parent
68e6c832
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
22 deletions
+22
-22
bt5/erp5_dhtml_style/SkinTemplateItem/portal_skins/erp5_dhtml_style/live_test.js.xml
...mplateItem/portal_skins/erp5_dhtml_style/live_test.js.xml
+21
-21
bt5/erp5_dhtml_style/bt/revision
bt5/erp5_dhtml_style/bt/revision
+1
-1
No files found.
bt5/erp5_dhtml_style/SkinTemplateItem/portal_skins/erp5_dhtml_style/live_test.js.xml
View file @
f8c832bc
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_EtagSupport__etag
</string>
</key>
<key>
<string>
_EtagSupport__etag
</string>
</key>
<value>
<string>
ts
20671633.65
</string>
</value>
<value>
<string>
ts
09819354.83
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
__name__
</string>
</key>
<key>
<string>
__name__
</string>
</key>
...
@@ -25,21 +25,21 @@
...
@@ -25,21 +25,21 @@
<item>
<item>
<key>
<string>
data
</string>
</key>
<key>
<string>
data
</string>
</key>
<value>
<string>
$(document).ready(function(){\n
<value>
<string>
$(document).ready(function(){\n
var my_url_run_test = $(document)[0].baseURI + \'runLiveTest\'\n
var my_url_run_test = $(document)[0].baseURI + \'runLiveTest\'
;
\n
var my_url_read_test = $(document)[0].baseURI + \'readTestOutput\'\n
var my_url_read_test = $(document)[0].baseURI + \'readTestOutput\'
;
\n
if (jQuery("*[name=\'field_your_test\']").length==0){\n
if (jQuery("*[name=\'field_your_test\']").length==
=
0){\n
// not in proper page no need to continue\n
// not in proper page no need to continue\n
return ;\n
return ;\n
}\n
}\n
\n
\n
var test = jQuery("*[name=\'field_your_test\']")[0].defaultValue\n
var test = jQuery("*[name=\'field_your_test\']")[0].defaultValue
;
\n
var run_only = jQuery("*[name=\'field_your_run_only\']")[0].defaultValue\n
var run_only = jQuery("*[name=\'field_your_run_only\']")[0].defaultValue
;
\n
var debug = 0\n
var debug = 0
;
\n
var verbose = 0\n
var verbose = 0
;
\n
if (jQuery("*[name=\'field_your_debug\']")[0].checked == true) {\n
if (jQuery("*[name=\'field_your_debug\']")[0].checked ==
=
true) {\n
debug = 1;\n
debug = 1;\n
}\n
}\n
if (jQuery("*[name=\'field_your_verbose\']")[0].checked == true) {\n
if (jQuery("*[name=\'field_your_verbose\']")[0].checked ==
=
true) {\n
verbose = 1;\n
verbose = 1;\n
}\n
}\n
jQuery("*[name=\'field_your_text_output\']")[0].defaultValue = "";\n
jQuery("*[name=\'field_your_text_output\']")[0].defaultValue = "";\n
...
@@ -52,35 +52,35 @@
...
@@ -52,35 +52,35 @@
verbose:verbose,\n
verbose:verbose,\n
}, \n
}, \n
function(data) {\n
function(data) {\n
continue_loop = false\n
continue_loop = false
;
\n
});\n
});\n
var last_call = false;\n
var last_call = false;\n
var data_size = 0;\n
var data_size = 0;\n
var data_textarea
= undefined
;\n
var data_textarea;\n
get_data = function() {\n
get_data = function() {\n
return $.get(my_url_read_test,\n
return $.get(my_url_read_test,\n
{position : data_size},\n
{position : data_size},\n
function(data){\n
function(data){\n
if ( data.length != undefined ) {\n
if ( data.length !=
=
undefined ) {\n
data_size = data_size + data.length;\n
data_size = data_size + data.length;\n
data_textarea = jQuery("*[name=\'field_your_text_output\']")[0];\n
data_textarea = jQuery("*[name=\'field_your_text_output\']")[0];\n
data_textarea.defaultValue += data;\n
data_textarea.defaultValue += data;\n
data_textarea.scrollTop = data_textarea.scrollHeight;\n
data_textarea.scrollTop = data_textarea.scrollHeight;\n
}\n
}\n
if (continue_loop == true) {\n
if (continue_loop ==
=
true) {\n
setTimeout(
"get_data()"
,1000);\n
setTimeout(
get_data
,1000);\n
}\n
}\n
if (continue_loop == false) {\n
if (continue_loop ==
=
false) {\n
if (last_call == false) {\n
if (last_call ==
=
false) {\n
last_call = true;\n
last_call = true;\n
setTimeout(
"get_data()"
,1000);\n
setTimeout(
get_data
,1000);\n
}\n
}\n
}\n
}\n
\n
\n
});\n
});\n
}\n
}
;
\n
var x=0;\n
var x=0;\n
get_data()\n
get_data()
;
\n
\n
\n
});
</string>
</value>
});
</string>
</value>
</item>
</item>
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
size
</string>
</key>
<key>
<string>
size
</string>
</key>
<value>
<int>
193
8
</int>
</value>
<value>
<int>
193
4
</int>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
...
...
bt5/erp5_dhtml_style/bt/revision
View file @
f8c832bc
12
13
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment