Skip to content

Commit 1bc0ea2

Browse files
committed
Merge branch 'develop' of github.com:OS2web/os2web_cp_service into develop
Conflicts: os2web_cp_service.info
2 parents b29c960 + 14e46ff commit 1bc0ea2

16 files changed

+500
-260
lines changed

.gitignore

100644100755
File mode changed.

LICENSE.txt

100644100755
File mode changed.

README.md

100644100755
File mode changed.

css/os2web_cp_service.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
.view-os2web-cp-service-cp-case-search .views-table caption{
1414
text-align: left;
1515
}
16+
.view-os2web-cp-service-cp-case-search .view-counter {
17+
18+
}
19+
.view-os2web-cp-service-cp-case-search .view-counter span {
20+
font-weight: bold;
21+
}
1622
#edit-search-text,
1723
#edit-field-os2web-cp-service-date-from-value-datepicker-popup-0,
1824
#edit-field-os2web-cp-service-date-to-value-datepicker-popup-0,
@@ -46,3 +52,11 @@
4652
th.views-field-field-os2web-cp-service-date {
4753
white-space: nowrap;
4854
}
55+
.os2web_cp_service-ajax-loader {
56+
background: url(../images/loading.gif) no-repeat;
57+
width: 20px;
58+
height: 20px;
59+
display: none;
60+
vertical-align: bottom;
61+
margin: 5px;
62+
}

images/loading.gif

4.36 KB
Loading

js/os2web_cp_service.js

Lines changed: 64 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,73 @@
44
*/
55

66
(function ($) {
7-
$(document).ready(function() {
8-
// Convert all nonalphanumeric chars to /.
9-
$('#views-exposed-form-os2web-cp-service-cp-case-search-panel-pane-1').submit(function() {
10-
// IE fix. Value and placeolder is the same on IE.
11-
if($('#edit-case-id').attr('placeholder') !== $('#edit-case-id').val()) {
12-
var value = $('#edit-case-id').val();
13-
$('#edit-case-id').val(value.replace(/\W/g, '/'));
14-
}
7+
$(document).ready(function() {
8+
// Convert all nonalphanumeric chars to /.
9+
$('#views-exposed-form-os2web-cp-service-cp-case-search-panel-pane-1').live('submit',function(e) {
10+
// Prevent double submissions.
11+
var $form = $(this);
1512

16-
// Reset dates if case id is entered.
17-
if($('#edit-case-id').val() || /^\d{2}\/\d/.test($('#edit-search-text').val())) {
18-
$('#edit-field-os2web-cp-service-date-from-value-datepicker-popup-0').val('');
19-
$('#edit-field-os2web-cp-service-date-to-value-datepicker-popup-0').val('');
20-
}
21-
});
13+
if ($form.data('submitted') === true) {
14+
// Previously submitted - don't submit again
15+
e.preventDefault();
16+
} else {
17+
// Mark it so that the next submit can be ignored
18+
$form.data('submitted', true);
19+
$form.find('button[type=submit], input[type=submit]').attr('disabled',true);
20+
}
2221

23-
$( "a.qtip-this[title]" ).qtip({
24-
style: {
25-
padding: 1,
26-
background: "#FFF",
27-
color: "black",
28-
textAlign: "center",
29-
border: {
30-
width: 1,
31-
radius: 2,
32-
color: "#DDD"
33-
},
34-
tip: "leftMiddle"
35-
},
36-
position: {
37-
corner: {
38-
target: "rightMiddle",
39-
tooltip: "leftMiddle"
40-
},
41-
adjust: {
42-
x : 10
22+
// IE fix. Value and placeolder is the same on IE.
23+
if($('#edit-case-id').attr('placeholder') !== $('#edit-case-id').val()) {
24+
var value = $('#edit-case-id').val();
25+
$('#edit-case-id').val(value.replace(/\W/g, '/'));
4326
}
27+
28+
// Reset dates if case id is entered.
29+
if($('#edit-case-id').val() || /^\d{2}\/\d/.test($('#edit-search-text').val())) {
30+
$('#edit-field-os2web-cp-service-date-from-value-datepicker-popup-0').val('');
31+
$('#edit-field-os2web-cp-service-date-to-value-datepicker-popup-0').val('');
32+
}
33+
});
34+
35+
$('#views-exposed-form-os2web-cp-service-cp-case-search-panel-pane-1 .form-submit').click(function(e){
36+
var $ajaxLoader = $('.os2web_cp_service-ajax-loader').css('display', 'inline-block');
37+
setTimeout(function() {
38+
$ajaxLoader.hide();
39+
}, 5000);
40+
});
41+
42+
$('.views-field-field-os2web-cp-service-file-id a').click(function(e){
43+
// Find the ajax loader in next td in table.
44+
var $ajaxLoader = $(this).parent().parent().find('.os2web_cp_service-ajax-loader').css('display', 'inline-block');
45+
setTimeout(function() {
46+
$ajaxLoader.hide();
47+
}, 5000);
48+
});
49+
50+
if(typeof $( "a.qtip-this[title]" ).qtip === 'function') {
51+
$("a.qtip-this[title]").qtip({
52+
style: {
53+
padding: 1,
54+
background: "#FFF",
55+
color: "black",
56+
textAlign: "center",
57+
border: {
58+
width: 1,
59+
radius: 2,
60+
color: "#DDD"
61+
},
62+
tip: "leftMiddle"
63+
},
64+
position: {
65+
corner: {
66+
target: "rightMiddle",
67+
tooltip: "leftMiddle"
68+
},
69+
adjust: {
70+
x : 10
71+
}
72+
}
73+
});
4474
}
4575
});
46-
});
4776
})(jQuery);

os2web_cp_service.context.inc

100644100755
File mode changed.

os2web_cp_service.features.field.inc

100644100755
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,117 @@ function os2web_cp_service_field_default_fields() {
10201020
),
10211021
);
10221022

1023+
// Exported field: 'node-os2web_cp_service_cp_case-field_os2web_cp_service_searchmt'.
1024+
$fields['node-os2web_cp_service_cp_case-field_os2web_cp_service_searchmt'] = array(
1025+
'field_config' => array(
1026+
'active' => '1',
1027+
'cardinality' => '1',
1028+
'deleted' => '0',
1029+
'entity_types' => array(),
1030+
'field_name' => 'field_os2web_cp_service_searchmt',
1031+
'foreign keys' => array(
1032+
'format' => array(
1033+
'columns' => array(
1034+
'format' => 'format',
1035+
),
1036+
'table' => 'filter_format',
1037+
),
1038+
),
1039+
'indexes' => array(
1040+
'format' => array(
1041+
0 => 'format',
1042+
),
1043+
),
1044+
'locked' => '0',
1045+
'module' => 'text',
1046+
'settings' => array(),
1047+
'translatable' => '0',
1048+
'type' => 'text_long',
1049+
),
1050+
'field_instance' => array(
1051+
'bundle' => 'os2web_cp_service_cp_case',
1052+
'default_value' => NULL,
1053+
'deleted' => '0',
1054+
'description' => '',
1055+
'display' => array(
1056+
'default' => array(
1057+
'label' => 'above',
1058+
'module' => 'text',
1059+
'settings' => array(),
1060+
'type' => 'text_default',
1061+
'weight' => 23,
1062+
),
1063+
'related_block' => array(
1064+
'label' => 'above',
1065+
'settings' => array(),
1066+
'type' => 'hidden',
1067+
'weight' => 0,
1068+
),
1069+
'teaser' => array(
1070+
'label' => 'above',
1071+
'settings' => array(),
1072+
'type' => 'hidden',
1073+
'weight' => 0,
1074+
),
1075+
),
1076+
'entity_type' => 'node',
1077+
'field_name' => 'field_os2web_cp_service_searchmt',
1078+
'label' => 'Search Metadata',
1079+
'required' => 0,
1080+
'settings' => array(
1081+
'better_formats' => array(
1082+
'allowed_formats' => array(
1083+
'blokindhold' => 'blokindhold',
1084+
'filtered_html' => 'filtered_html',
1085+
'full_html' => 'full_html',
1086+
'php_code' => 'php_code',
1087+
'plain_text' => 'plain_text',
1088+
'raw' => 'raw',
1089+
),
1090+
'allowed_formats_toggle' => 0,
1091+
'default_order_toggle' => 0,
1092+
'default_order_wrapper' => array(
1093+
'formats' => array(
1094+
'blokindhold' => array(
1095+
'weight' => '-7',
1096+
),
1097+
'filtered_html' => array(
1098+
'weight' => '-10',
1099+
),
1100+
'full_html' => array(
1101+
'weight' => '-9',
1102+
),
1103+
'php_code' => array(
1104+
'weight' => '-6',
1105+
),
1106+
'plain_text' => array(
1107+
'weight' => '-8',
1108+
),
1109+
'raw' => array(
1110+
'weight' => '0',
1111+
),
1112+
),
1113+
),
1114+
),
1115+
'linkit' => array(
1116+
'enable' => 0,
1117+
'insert_plugin' => '',
1118+
),
1119+
'text_processing' => '0',
1120+
'user_register_form' => FALSE,
1121+
),
1122+
'widget' => array(
1123+
'active' => 1,
1124+
'module' => 'text',
1125+
'settings' => array(
1126+
'rows' => '5',
1127+
),
1128+
'type' => 'text_textarea',
1129+
'weight' => '40',
1130+
),
1131+
),
1132+
);
1133+
10231134
// Exported field: 'node-os2web_cp_service_cp_case-field_os2web_cp_service_status'.
10241135
$fields['node-os2web_cp_service_cp_case-field_os2web_cp_service_status'] = array(
10251136
'field_config' => array(
@@ -2237,6 +2348,7 @@ function os2web_cp_service_field_default_fields() {
22372348
t('Sagsstatus - Sagstypebetegnelse');
22382349
t('Sagstitel');
22392350
t('Sagstype - Sagstype');
2351+
t('Search Metadata');
22402352
t('SystemID');
22412353
t('TriggerRules');
22422354

os2web_cp_service.features.inc

100644100755
File mode changed.

os2web_cp_service.features.taxonomy.inc

100644100755
File mode changed.

0 commit comments

Comments
 (0)