This commit is contained in:
hmm 2014-08-25 13:29:25 +08:00
commit 9e0c698dcd
17 changed files with 28 additions and 28 deletions

View File

@ -38,7 +38,7 @@ Behavior.prototype.loadBehaviorList = function(plugin) {
async : false, async : false,
success : function(response) { success : function(response) {
if (!response.success) { if (!response.success) {
alert(response.failedMessage); information(response.failedMessage);
return; return;
} }
behaviors = response.behaviors; behaviors = response.behaviors;
@ -67,7 +67,7 @@ Behavior.prototype.useBehaviorOfOnePluginContainerInit = function(plugin,
.children(); .children();
if (this.insertLocation == "before") { if (this.insertLocation == "before") {
for ( var j = length - 1; j > parseInt(this.clickPluginBehaviorNode - 1); j--) { for ( var j = length - 1; j > parseInt(this.clickPluginBehaviorNode - 1); j--) {
alert("j=" + j); information("j=" + j);
this.behaviorWithPluginList[j + 1] = this.behaviorWithPluginList[j]; this.behaviorWithPluginList[j + 1] = this.behaviorWithPluginList[j];
$(documentChild[j]).attr("id", parseInt(j + 1)); $(documentChild[j]).attr("id", parseInt(j + 1));
} }

View File

@ -22,7 +22,7 @@ Plugin.prototype.loadPluginNameList = function() {
async : false, async : false,
success : function(response) { success : function(response) {
if (!response.success) { if (!response.success) {
alert(response.failedMessage); information(response.failedMessage);
return; return;
} }
var pluginNameList = response.pluginNames; var pluginNameList = response.pluginNames;
@ -54,7 +54,7 @@ Plugin.prototype.loadPluginUIList = function() {
async : false, async : false,
success : function(response) { success : function(response) {
if (!response.success) { if (!response.success) {
alert(response.failedMessage); information(response.failedMessage);
return; return;
} }
plugin.pluginList = response.pluginUIs;// List<PluginUIModel>pluginUIModels plugin.pluginList = response.pluginUIs;// List<PluginUIModel>pluginUIModels

View File

@ -61,6 +61,6 @@ ContainerFactory.prototype.appendEdtiors = function(container, label, name,
editorFactory.createSelect(label, name, editorInfo.size, editorFactory.createSelect(label, name, editorInfo.size,
editorInfo.options, name)); editorInfo.options, name));
} else { } else {
alert("no such editor type:" + editorInfo.type); information("no such editor type:" + editorInfo.type);
} }
}; };

View File

@ -9,7 +9,7 @@ DataCollector.prototype.fieldData = function(editor) {
var name = editor.children("label").html(); var name = editor.children("label").html();
var value = editor.children("input").val(); var value = editor.children("input").val();
if (value == null || value == "") { if (value == null || value == "") {
alert("please input data in " + editor.attr("id")); information("please input data in " + editor.attr("id"));
return; return;
} }
@ -19,7 +19,7 @@ DataCollector.prototype.dateData = function(editor) {
var name = editor.children("label").html(); var name = editor.children("label").html();
var value = editor.children("input").val(); var value = editor.children("input").val();
if (value == null || value == "") { if (value == null || value == "") {
alert("please input data in " + editor.attr("id")); information("please input data in " + editor.attr("id"));
return; return;
} }
@ -28,7 +28,7 @@ DataCollector.prototype.dateData = function(editor) {
DataCollector.prototype.multiFieldData = function(editor) { DataCollector.prototype.multiFieldData = function(editor) {
var editorArray = editor.children(".field"); var editorArray = editor.children(".field");
if (ediotrArray.size == 0) { if (ediotrArray.size == 0) {
alert("please input data in " + editor.attr("id")); information("please input data in " + editor.attr("id"));
return; return;
} }
@ -38,7 +38,7 @@ DataCollector.prototype.multiFieldData = function(editor) {
for ( var i = 0; i < editorArray.length; i++) { for ( var i = 0; i < editorArray.length; i++) {
var filedValue = $(editorArray[i]).children("input").val(); var filedValue = $(editorArray[i]).children("input").val();
if (filedValue == null || filedValue == "") { if (filedValue == null || filedValue == "") {
alert("please input data in" + editor.attr("id")); information("please input data in" + editor.attr("id"));
return; return;
} }

View File

@ -176,7 +176,7 @@ EditorFactory.prototype.createSelect = function(label, name, size, options, id)
size = 150; size = 150;
} }
if (options == null || options.length <= 0) { if (options == null || options.length <= 0) {
alert("no options in:" + name); information("no options in:" + name);
} }
var div = this.createBaseEditor(label, id); var div = this.createBaseEditor(label, id);

View File

@ -111,7 +111,7 @@ $("#remove-device").click(function(event) {
return ; return ;
} }
else{ else{
alert(data.failedMessage); information(data.failedMessage);
} }
} }
}); });

View File

@ -111,7 +111,7 @@ function Behavior(usePlugin, containerId) {
pluginName : pluginName pluginName : pluginName
}, function(data) { }, function(data) {
if (!data.success) { if (!data.success) {
alert("fail"); information("fail");
return; return;
} }
$("#pluginMethod").html(""); $("#pluginMethod").html("");

View File

@ -71,6 +71,6 @@ ContainerFactory.prototype.appendEdtiors = function(container, label, name, id,
editorFactory.createCheckBox(label, name, editorFactory.createCheckBox(label, name,
editorInfo.choiceModels, id,value)); editorInfo.choiceModels, id,value));
} else { } else {
alert("no such editor type:" + editorInfo.type); information("no such editor type:" + editorInfo.type);
} }
}; };

View File

@ -6,7 +6,7 @@ var DataCollector = function() {
}; };
DataCollector.prototype.validate = function(value) { DataCollector.prototype.validate = function(value) {
if (value == null || value == "") { if (value == null || value == "") {
alert($.i18n.prop('dataCollect-input')); information($.i18n.prop('dataCollect-input'));
return false; return false;
} }
return true; return true;
@ -41,7 +41,7 @@ DataCollector.prototype.dateData = function(editor) {
DataCollector.prototype.multiFieldData = function(editor) { DataCollector.prototype.multiFieldData = function(editor) {
var editorArray = editor.children(".field"); var editorArray = editor.children(".field");
if (editorArray.size == 0) { if (editorArray.size == 0) {
alert($.i18n.prop('dataCollect-input')); information($.i18n.prop('dataCollect-input'));
return; return;
} }
@ -146,7 +146,7 @@ DataCollector.prototype.getUnitParams = function(paramEditors) {
} }
params.push(data); params.push(data);
} else { } else {
alert($.i18n.prop('dataCollect-errorType')); information($.i18n.prop('dataCollect-errorType'));
} }
} }

View File

@ -229,7 +229,7 @@ EditorFactory.prototype.createSelect = function(label, name, size, options, id,
size = 150; size = 150;
} }
if (options == null || options.length <= 0) { if (options == null || options.length <= 0) {
alert("no options in:" + name); information("no options in:" + name);
} }
var div = this.createBaseEditor(label, id); var div = this.createBaseEditor(label, id);

View File

@ -111,7 +111,7 @@ function Behavior(usePlugin, containerId) {
pluginName : pluginName pluginName : pluginName
}, function(data) { }, function(data) {
if (!data.success) { if (!data.success) {
alert("fail"); information("fail");
return; return;
} }
$("#pluginMethod").html(""); $("#pluginMethod").html("");

View File

@ -71,6 +71,6 @@ ContainerFactory.prototype.appendEdtiors = function(container, label, name, id,
editorFactory.createCheckBox(label, name, editorFactory.createCheckBox(label, name,
editorInfo.choiceModels, id,value)); editorInfo.choiceModels, id,value));
} else { } else {
alert("no such editor type:" + editorInfo.type); information("no such editor type:" + editorInfo.type);
} }
}; };

View File

@ -6,7 +6,7 @@ var DataCollector = function() {
}; };
DataCollector.prototype.validate = function(value) { DataCollector.prototype.validate = function(value) {
if (value == null || value == "") { if (value == null || value == "") {
alert($.i18n.prop('dataCollect-input')); information($.i18n.prop('dataCollect-input'));
return false; return false;
} }
return true; return true;
@ -41,7 +41,7 @@ DataCollector.prototype.dateData = function(editor) {
DataCollector.prototype.multiFieldData = function(editor) { DataCollector.prototype.multiFieldData = function(editor) {
var editorArray = editor.children(".field"); var editorArray = editor.children(".field");
if (editorArray.size == 0) { if (editorArray.size == 0) {
alert($.i18n.prop('dataCollect-input')); information($.i18n.prop('dataCollect-input'));
return; return;
} }
@ -146,7 +146,7 @@ DataCollector.prototype.getUnitParams = function(paramEditors) {
} }
params.push(data); params.push(data);
} else { } else {
alert($.i18n.prop('dataCollect-errorType')); information($.i18n.prop('dataCollect-errorType'));
} }
} }

View File

@ -229,7 +229,7 @@ EditorFactory.prototype.createSelect = function(label, name, size, options, id,
size = 150; size = 150;
} }
if (options == null || options.length <= 0) { if (options == null || options.length <= 0) {
alert("no options in:" + name); information("no options in:" + name);
} }
var div = this.createBaseEditor(label, id); var div = this.createBaseEditor(label, id);

View File

@ -2,7 +2,7 @@ var script = new Array();
$(document).ready(function() { $(document).ready(function() {
$.post("loadScripts", {}, function(data) { $.post("loadScripts", {}, function(data) {
if (!data.success) { if (!data.success) {
alert(data.failedMessage); information(data.failedMessage);
return; return;
} }
data = data.scripts; data = data.scripts;

View File

@ -18,7 +18,7 @@ $(function() {
behavior.loadBehaviorResults(testPlanRunId, testPlan.scripts); behavior.loadBehaviorResults(testPlanRunId, testPlan.scripts);
var tree = getResultTree(testPlanRunId); var tree = getResultTree(testPlanRunId);
if (tree == null) { if (tree == null) {
alert($.i18n.prop('test-error')); information($.i18n.prop('test-error'));
} }
var chart = new Chart(); var chart = new Chart();
@ -36,7 +36,7 @@ $(function() {
var testStatus = testStatusMap("Complete"); var testStatus = testStatusMap("Complete");
$('#status').html("<h4>" + testStatus + '</h4>'); $('#status').html("<h4>" + testStatus + '</h4>');
} else { } else {
alert($.i18n("stopTestPlan_fail")); information($.i18n("stopTestPlan_fail"));
} }
}) })

View File

@ -169,7 +169,7 @@ Tree.prototype.getTreePathNodes = function(pathValues) {
if (pathValues == null) if (pathValues == null)
return; return;
if (this.root == null) { if (this.root == null) {
alert("error"); information("error");
return; return;
} }
var currentNode = this.root; var currentNode = this.root;
@ -178,7 +178,7 @@ Tree.prototype.getTreePathNodes = function(pathValues) {
nodeArray.push(new DeleteNode(this.root, 0)); nodeArray.push(new DeleteNode(this.root, 0));
for ( var i = 0; i < pathValues.length; i++) { for ( var i = 0; i < pathValues.length; i++) {
if (currentNode.children == null) { if (currentNode.children == null) {
alert("error"); information("error");
return null; return null;
} }
for ( var j = 0; j < currentNode.children.length; j++) for ( var j = 0; j < currentNode.children.length; j++)