Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
define('package/quiqqer/cron/bin/AddCronWindow', [
'qui/controls/windows/Confirm',
'Ajax',
'css!package/quiqqer/cron/bin/AddCronWindow'
], function(QUIConfirm, Ajax)
{
"use strict";
return new Class({
Type : 'package/quiqqer/cron/bin/AddCronWindow',
Extends : QUIConfirm,
options : {
title : 'Cron hinzufügen',
icon : 'icon-time',
maxWidth : 500,
maxHeight : 300
},
initialize : function(options)
{
this.parent( options );
this.$available = [];
this.$List = null;
this.$Min = null;
this.$Hour = null;
this.$Day = null;
this.$Month = null;
},
/**
* Open the Window
*
* @return {self}
*/
open : function()
{
this.parent();
this.Loader.show();
var self = this,
Content = this.getContent();
Content.set(
'html',
'<div class="control-cron-add">' +
'<label for="control-cron-add-list">' +
'Cron' +
'</label>' +
'<select ' +
'class="control-cron-add-list" ' +
'id="control-cron-add-list">' +
'</select>' +
'<div class="control-cron-add-intervall">' +
'<div class="control-cron-add-intervall-title">' +
'Intervall:' +
'</div>' +
'<div class="control-cron-add-intervall-entries">' +
'<div class="control-cron-add-intervall-entry">' +
'<input type="text" name="min" id="control-cron-add-minute" />' +
'<label for="control-cron-add-minute">Minute</label>' +
'</div>' +
'<div class="control-cron-add-intervall-entry">' +
'<input type="text" name="hour" id="control-cron-add-hour" />' +
'<label for="control-cron-add-hour">Stunde</label>' +
'</div>' +
'<div class="control-cron-add-intervall-entry">' +
'<input type="text" name="day" id="control-cron-add-day" />' +
'<label for="control-cron-add-day">Tag</label>' +
'</div>' +
'<div class="control-cron-add-intervall-entry">' +
'<input type="text" name="month" id="control-cron-add-month" />' +
'<label for="control-cron-add-month">Monat</label>' +
'</div>' +
'</div>' +
'</div>' +
'</div>'
);
this.$List = Content.getElement( '.control-cron-add-list' );
this.$Min = Content.getElement( '[name="min"]' );
this.$Hour = Content.getElement( '[name="hour"]' );
this.$Day = Content.getElement( '[name="day"]' );
this.$Month = Content.getElement( '[name="month"]' );
Ajax.get('package_quiqqer_cron_ajax_getAvailableCrons', function(result)
{
var i, len;
self.$available = result;
for ( i = 0, len = result.length; i < len; i++ )
{
new Element('option', {
value : result[ i ].title,
html : result[ i ].description
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
}).inject( self.$List );
}
self.Loader.hide();
}, {
'package' : 'quiqqer/cron'
});
return this;
},
/**
* Add the Cron to the list
*
* @return {self}
*/
submit : function()
{
if ( !this.$List ) {
return this;
}
if ( !this.getContent() ) {
return this;
}
Ajax.post('package_quiqqer_cron_ajax_add', function(result)
{