2013-06-22 06:24:24 +00:00
|
|
|
'use strict';
|
2013-06-24 23:41:59 +00:00
|
|
|
define({
|
|
|
|
Execute: function (name, properties) {
|
|
|
|
var data = { command: name };
|
2013-05-11 23:39:32 +00:00
|
|
|
|
2013-06-24 23:41:59 +00:00
|
|
|
if (properties) {
|
|
|
|
$.extend(data, properties);
|
|
|
|
}
|
2013-06-13 02:55:11 +00:00
|
|
|
|
2013-06-24 23:41:59 +00:00
|
|
|
return $.ajax({
|
|
|
|
type: 'POST',
|
|
|
|
url : window.ApiRoot + '/command',
|
|
|
|
data: JSON.stringify(data)
|
|
|
|
});
|
2013-06-13 02:55:11 +00:00
|
|
|
}
|
2013-06-24 23:41:59 +00:00
|
|
|
});
|