Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a4d38233

Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt

  • ID a4d38233df45f80fb98c503108b40294d212653a
  • Vorgänger ab92bc46
  • Nachfolger 39bbd478

Verknüpfte Belege: JS-Code und CSS für jqModal verallgemeinert

Unterschiede anzeigen:

SL/Form.pm
471 471
    main menu list_accounts jquery.autocomplete
472 472
    jquery.multiselect2side frame_header/header
473 473
    ui-lightness/jquery-ui
474
    jquery-ui.custom
474
    jquery-ui.custom jqModal
475 475
  );
476 476

  
477 477
  $layout->use_javascript("$_.js") for (qw(
bin/mozilla/do.pl
313 313

  
314 314
  $form->{follow_up_trans_info} = $form->{donumber} .'('. $follow_up_vc .')';
315 315

  
316
  $::request->layout->use_stylesheet('presenter/record/record_list.css');
317

  
318 316
  $form->header();
319 317
  # Fix für Bug 1082 Erwartet wird: 'abteilungsNAME--abteilungsID'
320 318
  # und Erweiterung für Bug 1760:
bin/mozilla/ir.pl
358 358
  map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}];
359 359

  
360 360
  $form->{jsscript} = 1;
361
  $::request->layout->use_stylesheet('presenter/record/record_list.css');
362 361
  $form->header();
363 362

  
364 363
  print $form->parse_html_template("ir/form_header", \%TMPL_VAR);
bin/mozilla/is.pl
382 382
  map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}];
383 383

  
384 384
  $form->{jsscript} = 1;
385
  $::request->layout->use_stylesheet('presenter/record/record_list.css');
386 385
  $form->header();
387 386

  
388 387
  print $form->parse_html_template("is/form_header", \%TMPL_VAR);
bin/mozilla/oe.pl
436 436
  $form->{javascript} .= qq|<script type="text/javascript" src="js/show_history.js"></script>|;
437 437
  $form->{javascript} .= qq|<script type="text/javascript" src="js/show_vc_details.js"></script>|;
438 438

  
439
  $::request->layout->use_stylesheet('presenter/record/record_list.css');
440

  
441 439
  $form->header;
442 440

  
443 441
  $TMPL_VAR{HIDDENS} = [ map { name => $_, value => $form->{$_} },
css/kivitendo/jqModal.css
1
/* the overlayed element */
2
.jqModal_overlay {
3
  position: fixed;
4
  top: 50%;
5
  margin-top: -250px;
6
  height: 500px;
7

  
8
  left: 50%;
9
  margin-left: -400px;
10
  width: 800px;
11

  
12
  background-color: #fff;
13
  border: 1px solid #333;
14

  
15
  /* CSS3 styling for latest browsers */
16
  box-shadow: 0 0 90px 5px #000;
17
  -moz-box-shadow: 0 0 90px 5px #000;
18
  -webkit-box-shadow: 0 0 90px #000;
19

  
20
  padding: 10px;
21
}
22

  
23
.jqModal_overlay .overlay_content {
24
  width: 790px;
25
  height: 490px;
26
  overflow: auto;
27
}
28

  
29
.jqModal_overlay .close {
30
  background-image: url(../../image/dialog-close.png);
31
  position: absolute;
32
  right: -16px;
33
  top: -16px;
34
  cursor: pointer;
35
  height: 32px;
36
  width: 32px;
37
}
css/presenter/record/record_list.css
1
/* the overlayed element */
2
.record_list_overlay {
3
  position: fixed;
4
  top: 50%;
5
  margin-top: -250px;
6
  height: 500px;
7

  
8
  left: 50%;
9
  margin-left: -400px;
10
  width: 800px;
11

  
12
  background-color: #fff;
13
  border: 1px solid #333;
14

  
15
  /* CSS3 styling for latest browsers */
16
  box-shadow: 0 0 90px 5px #000;
17
  -moz-box-shadow: 0 0 90px 5px #000;
18
  -webkit-box-shadow: 0 0 90px #000;
19

  
20
  padding: 10px;
21
}
22

  
23
.record_list_overlay .overlay_content {
24
  width: 790px;
25
  height: 490px;
26
  overflow: auto;
27
}
28

  
29
.record_list_overlay .close {
30
  background-image: url(../../../image/dialog-close.png);
31
  position: absolute;
32
  right: -16px;
33
  top: -16px;
34
  cursor: pointer;
35
  height: 32px;
36
  width: 32px;
37
}
js/common.js
160 160
  return false;
161 161
}
162 162

  
163
function open_jqm_window(params) {
164
  params = params || { };
165
  var url = params.url;
166
  var id  = params.id ? params.id : 'jqm_popup_dialog';
167

  
168
  if (params.data) {
169
    var data  = typeof params.data === "string" ? params.data : $.param(params.data);
170
    url      += (/\?/.exec(url) ? "&" : "?") + data;
171
  }
172

  
173
  $('#' + id).remove();
174
  var div     = $('<div id="' + id + '" class="jqmWindow jqModal_overlay ' + (params.class || '') + '"></div>').hide().appendTo('body');
175
  var close   = $('<div class="close"></div>').appendTo(div);
176
  var content = $('<div class="overlay_content"></div>').appendTo(div);
177
  div.jqm({ modal: true });
178
  div.jqmShow();
179
  $.ajax({ url: url, success: function(new_html) { $(content).html(new_html); } });
180
  $(close).click(function() {
181
    div.jqmClose();
182
  });
183

  
184
  return true;
185
}
186

  
163 187
$(document).ready(function () {
164 188
  // initialize all jQuery UI tab elements:
165 189
  $(".tabwidget").each(function(idx, element) { $(element).tabs(); });
js/jqModal/jqModal.js
34 34
$.fn.jqmAddTrigger=function(e){return hs(this,e,'jqmShow');};
35 35
$.fn.jqmShow=function(t){return this.each(function(){t=t||window.event;$.jqm.open(this._jqm,t);});};
36 36
$.fn.jqmHide=function(t){return this.each(function(){t=t||window.event;$.jqm.close(this._jqm,t)});};
37
$.fn.jqmClose=function(t){return this.each(function(){t=t||window.event;$.jqm.close(this._jqm,t);this.remove();});};
37 38

  
38 39
$.jqm = {
39 40
hash:{},
templates/webpages/presenter/record/grouped_record_list.html
17 17

  
18 18
 <script type="text/javascript">
19 19
  <!--
20
$(function() {
21

  
22
});
23

  
24 20
function record_links_add() {
25
  var url = "controller.pl?action=RecordLinks/ajax_add_filter&object_model=[% JavaScript.escape(object_model) %]&object_id=[% JavaScript.escape(object_id) %]&";
26
  var id  = 'record_links_add';
27

  
28
  $('#' + id).remove();
29
  var div     = $('<div id="' + id + '" class="jqmWindow record_list_overlay"></div>').hide().appendTo('body');
30
  var close   = $('<div class="close"></div>').appendTo(div);
31
  var content = $('<div class="overlay_content"></div>').appendTo(div);
32
  div.jqm({ modal: true });
33
  div.jqmShow();
34
  $.ajax({ url: url, success: function(new_html) { $(content).html(new_html); } });
35
  $(close).click(function() {
36
    div.jqmHide();
37
    div.remove();
38
  });
21
  open_jqm_window({ url:  'controller.pl',
22
                    data: { action: 'RecordLinks/ajax_add_filter',
23
                            object_model: '[% JavaScript.escape(object_model) %]',
24
                            object_id: '[% JavaScript.escape(object_id) %]'
25
                          },
26
                    id:  'record_links_add' });
27
  return true;
39 28
}
40 29

  
41 30
function record_links_delete() {
templates/webpages/record_links/add_filter.html
46 46
  [% L.button_tag('filter_record_links()', LxERP.t8("Search")) %]
47 47
  [% L.button_tag('add_selected_record_links()', LxERP.t8("Add links"), id='add_selected_record_links_button', disabled=1) %]
48 48
  <a href="#" onclick="record_links_reset_form();">[%- LxERP.t8("Reset") %]</a>
49
  <a href="#" onclick="record_links_cancel();">[% LxERP.t8("Cancel") %]</a>
49
  <a href="#" onclick="$('#record_links_add').jqmClose();">[% LxERP.t8("Cancel") %]</a>
50 50
 </p>
51 51

  
52 52
 <hr>
......
66 66
  $('.jqmWindow form select').prop('selectedIndex', 0);
67 67
}
68 68

  
69
function record_links_cancel() {
70
  $('.jqmWindow').jqmHide();
71
  $('.jqmWindow').remove();
72
}
73

  
74 69
function filter_record_links() {
75 70
  var url="controller.pl?action=RecordLinks/ajax_add_list&" + $(".jqmWindow form").serialize();
76 71
  $.ajax({

Auch abrufbar als: Unified diff