rails_admin_live_edit 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14e886581a48a09af1d6a3c621824d6eccafc914
4
- data.tar.gz: bbb2a0508237a45fc700cdddc61c3cefa67d2f00
3
+ metadata.gz: 3b6b4a676bed556b540062787187771802df7a4b
4
+ data.tar.gz: bb497e09e631aa8abb6c37d7bad2c5844eb5d4b8
5
5
  SHA512:
6
- metadata.gz: f3be3b11ffa82e9c41fef2f07acb70865bba510ed4e5367c80ed2030180fc763c9dc10577da187dd82580b88e7a3a252fd26a1042101f1af26b795d0769f6b8d
7
- data.tar.gz: f94b8d583b2e32f3d29719902bcfce7f1f87ac6df5dbd6c10ab13250faf26d7f478789c58325bb760a95db1bb2e4285dc19d6561d760a51c59b3ac8ff9656966
6
+ metadata.gz: 590d64361e39287ca1a16421e2291e64ed4209b1538c987198474557f67b1279ea54d808c7888acb2f5d1f552e3df2b6a380d355667a198035ebdbd0c7457525
7
+ data.tar.gz: 29ab465455b1bf0401cca0ba6724ffd6b302cedd722888155508f757157cdb8c2f4cdadaedf8b431fc52d8fd1876f0a07e684a4379d2f26001c5c755af8db3e3
@@ -15,20 +15,27 @@
15
15
  text-decoration: none;
16
16
  }
17
17
  .ra-le-button.btn1 {
18
+ border-top: 1px solid #aaa;
18
19
  border-left: 1px solid #aaa;
19
- border-bottom: 1px solid #aaa;
20
- border-radius: 0 0 0 5px;
20
+ border-radius: 5px 0 0 0;
21
21
  }
22
22
  .ra-le-button.btn2 {
23
+ border-top: 1px solid #aaa;
23
24
  border-left: 1px solid #aaa;
24
25
  border-right: 1px solid #aaa;
25
- border-bottom: 1px solid #aaa;
26
- border-radius: 0 0 5px 0;
26
+ border-radius: 0 5px 0 0;
27
27
  }
28
28
  .ra-le-controls {
29
+ background: rgba(0, 0, 0, .2);
30
+ bottom: 0;
31
+ left: 0;
32
+ padding-top: 5px;
29
33
  position: fixed;
30
- top: 0;
31
- right: 10px;
34
+ text-align: right;
35
+ width: 100%;
36
+ }
37
+ .ra-le-controls > a:last-child {
38
+ margin-right: 5px;
32
39
  }
33
40
  .ra-le-controls > a:hover {
34
41
  background: #eee;
@@ -92,6 +99,7 @@
92
99
  .modal-footer
93
100
  .dlg-buttons
94
101
  %a.btn-close.ra-le-button{ href: '#', onclick: 'event.preventDefault();modal.close();' }= t 'live_edit.button.close'
102
+
95
103
  .ra-le-controls
96
104
  %a.btn1.ra-le-button#ra-le-open-modal{ href: '#' }>= t 'live_edit.button.edit_page'
97
105
  = link_to t('live_edit.button.admin'), rails_admin_path, class: 'btn2 ra-le-button'
@@ -260,19 +268,15 @@
260
268
  window.onload = function() {
261
269
  var modal = new RModal(document.getElementById('ra-le-modal'), {
262
270
  beforeOpen: function(next) {
263
- console.log('beforeOpen');
264
271
  document.getElementById('ra-le-content').innerHTML = '<iframe src="#{rails_admin.edit_path( ra_le_model, ra_le_id )}" width="930px" height="470px"></iframe>';
265
272
  next();
266
273
  },
267
274
  afterOpen: function() {
268
- console.log('opened');
269
275
  },
270
276
  beforeClose: function(next) {
271
- console.log('beforeClose');
272
277
  next();
273
278
  },
274
279
  afterClose: function() {
275
- console.log('closed');
276
280
  window.location.reload( true );
277
281
  }
278
282
  // , bodyClass: 'modal-open'
@@ -1,3 +1,3 @@
1
1
  module RailsAdminLiveEdit
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.4'
3
3
  end
@@ -7,7 +7,7 @@ function inIframe() {
7
7
  }
8
8
 
9
9
  if( inIframe() ) {
10
- $(document).ready( function() {
10
+ $(document).on('rails_admin.dom_ready', function(){
11
11
  $('body').css('padding-top', '0');
12
12
  $('nav.navbar').hide();
13
13
  $('.breadcrumb').hide();
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin_live_edit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mattia Roccoberton