admin_data 1.0.10 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
data/lib/css/umbrella.css DELETED
@@ -1,34 +0,0 @@
1
- .umbrella {
2
- font-family:lucida grande,verdana;
3
- font-size:12px;
4
- text-align:left;
5
- }
6
- .umbrella h1 {
7
- color:#000000;
8
- font-size: 26px;
9
- font-weight: bold;
10
- border-bottom: 1px dotted #CCCCCC;
11
- }
12
- #main .block .umbrella h2 {
13
- color:#000000;
14
- font-size:16px;
15
- margin: 10px 0 2px 0;
16
- padding:0;
17
- font-family:"Lucida Grande",arial,sans-serif;
18
- }
19
- .umbrella h2 span {
20
- color: #666;
21
- font-size: 12px;
22
- font-weight: normal;
23
- }
24
- .umbrella input {
25
- font-size:14px;
26
- margin-bottom:10px;
27
- padding:3px;
28
- }
29
- .umbrella input.button {
30
- font-size:14px;
31
- margin:10px 0 0;
32
- padding:3px;
33
- width:auto;
34
- }
@@ -1,46 +0,0 @@
1
- var AdminData = AdminData || {};
2
-
3
- AdminData.advanceSearch = {
4
-
5
- buildFirstRow: function(){
6
- $('#advance_search_table').
7
- append(this.buildRow()).find('tr td:last a').text('+').removeClass('remove_row').addClass('add_row_link');
8
- },
9
-
10
- buildCol1: function() {
11
- var col = $('<select />', {className: 'col1' }).append($('<option />'));
12
- var tableStructure = $('#advance_search_table').data('table_structure');
13
- for (var i in tableStructure) {
14
- $('<option />').text(i).attr('value', i).appendTo(col);
15
- }
16
- return $('<td />').append(col);
17
- },
18
-
19
- buildCol2: function() {
20
- return $('<td />').
21
- append('<select />').
22
- find('select').
23
- append('<option />').
24
- addClass('col2 disabled').
25
- attr({ disabled: true }).
26
- end();
27
- },
28
-
29
- buildCol3: function() {
30
- return $('<td />').append($('<input />',{disabled: true, className: 'col3'}));
31
- },
32
-
33
- buildCol4: function() {
34
- return $('<td />').append($('<a />', {text: 'x', href: '#', className: 'remove_row'}));
35
- },
36
-
37
- buildRow: function() {
38
- var $tr = $('<tr />').append(this.buildCol1(), this.buildCol2(), this.buildCol3(), this.buildCol4());
39
- var randomNumber = AdminData.jsUtil.randomNumber();
40
- $tr.find('select.col1').attr({ name: 'adv_search[' + randomNumber + '_row][col1]'});
41
- $tr.find('select.col2').attr({ name: 'adv_search[' + randomNumber + '_row][col2]'});
42
- $tr.find('input.col3').attr({ name: 'adv_search[' + randomNumber + '_row][col3]'});
43
- return $tr;
44
- }
45
-
46
- };
@@ -1,66 +0,0 @@
1
- jQuery(document).ready(function($) {
2
- return function($) {
3
- function handleSuccess(json, statusText) {
4
- $('#spinner').hide();
5
- var base_url;
6
-
7
- if (! (json.error === undefined)) {
8
- $('#submit').attr('value', 'Start validation');
9
- $('#validation_result').html('').hide();
10
- $('#error').html(json.error).show();
11
- } else if (json.still_processing === 'yes') {
12
- if (! (json.base_url === undefined)) {
13
- base_url = json.base_url;
14
- }
15
- var keep_checking = function() {
16
- var url = base_url + '/admin_data/diagnostic/validate_model?still_processing=yes';
17
- url = url + '&tid=' + $('#tid').text();
18
- var fn = function(json) {
19
- if (json.still_processing === 'no') {
20
- clearInterval(refreshID);
21
- $('#submit').attr('value', 'Start validation');
22
- $('#validation_result').html('').hide();
23
- $('#validation_result').html('Validation result').show();
24
- $('#validate_model_rhs_data').html(json.data);
25
- } else {
26
- var processed_info = json.currently_processing_klass;
27
- var s = processed_info + ' ... ';
28
- $('#validation_result').html(s);
29
- $('#validate_model_rhs_data').html(json.data);
30
- }
31
- };
32
-
33
- $.getJSON(url, fn);
34
- };
35
- var refreshID = setInterval(keep_checking, 4000);
36
- } else {
37
- $('#validation_result').html('Validation result').show();
38
- $('#validate_model_rhs_data').html(json.data);
39
- }
40
- }
41
-
42
- function preSubmit(formData, jqForm, options) {
43
- $('html,body').animate({
44
- scrollTop: 0
45
- },
46
- 0);
47
- $('#validate_model_rhs_data').html('');
48
- $('#validation_result').html('Processing .... This page will refersh itself periodically.').show();
49
- $('#error').hide();
50
- $('#spinner').show();
51
- $('#submit').attr('value', 'processing ...');
52
- return true;
53
- }
54
-
55
- var options = {
56
- beforeSubmit: preSubmit,
57
- success: handleSuccess,
58
- dataType: 'json'
59
- };
60
-
61
- $('#validate_model_form').ajaxForm(options);
62
-
63
- };
64
- } (jQuery));
65
-
66
-
@@ -1,15 +0,0 @@
1
- jQuery(document).ready(function($) {
2
- return function($) {
3
-
4
- $('input#validate_model_select_all').click(function() {
5
- if ($(this).attr('checked')) {
6
- $("input[type=checkbox]").attr("checked", true);
7
- } else {
8
- $("input[type=checkbox]").attr("checked", false);
9
- }
10
- });
11
-
12
- };
13
- } (jQuery));
14
-
15
-