tawork 0.0.38 → 0.0.39
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile +1 -0
- data/Gemfile.lock +3 -0
- data/app/assets/javascripts/application.js +1 -0
- data/app/assets/javascripts/backbone/views/compare.js.coffee +40 -0
- data/app/assets/stylesheets/bootstrap_and_overrides.sass +6 -5
- data/app/views/layouts/_compare_layout.html.haml +5 -1
- data/app/views/wiki/pages/compare.html.haml +28 -6
- data/lib/tawork/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTM5ZWRjOTBmODlhMzc0OGVhM2ExNGY0Y2NlYWRjMTRlZGUzMWI4OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTZjZjJiZDYzNDhhZGUyNDhhMTY5MjZhZDM0OWM2NzY4ODMwMDZmMw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OGYwMjc0YzQzZmU3ZWZmMmMxNDJkNDc0ZGY0ZjlmZjE3OWEwNjNmMTYwMWEy
|
10
|
+
YjEzYTY0OTZkZWUyZTU0NGM4ZGVjZjc4NGMzNjQxOGYwYWQ5MTUzMjhkYTlj
|
11
|
+
NGNiNTQ2ZDhlYTlmYTFmZTVmZWZkNjJmMmUzYmUxMTdlZTJhMWE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjBjMThhNTVmZmE0NTlkMTFlOTRlYWU3MTZmYzQyYWNjZDBkZGY1MjUxODQ3
|
14
|
+
NjFjZWJkMzE5ZGJkMDBmNDJjMGFjMmM2YTE0MDNhMzZhZTRiYjRlZmYxYzkx
|
15
|
+
ZWJhZGNiNzIyNGY1ZDdiMTNkZDU4OTI3ZDZkZWFjYTFmMjQxZGQ=
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -267,6 +267,8 @@ GEM
|
|
267
267
|
rails-assets-jquery (>= 1.7)
|
268
268
|
rails-assets-jquery-ui (1.10.4)
|
269
269
|
rails-assets-jquery (>= 1.6)
|
270
|
+
rails-assets-jquery.scrollTo (1.4.11)
|
271
|
+
rails-assets-jquery (>= 1.8)
|
270
272
|
rails-assets-underscore (1.6.0)
|
271
273
|
rails-timeago (2.9.0)
|
272
274
|
actionpack (>= 3.1)
|
@@ -372,6 +374,7 @@ DEPENDENCIES
|
|
372
374
|
rails-assets-highlightjs
|
373
375
|
rails-assets-jquery-autosize
|
374
376
|
rails-assets-jquery-ui
|
377
|
+
rails-assets-jquery.scrollTo
|
375
378
|
rails-assets-underscore
|
376
379
|
rails-timeago
|
377
380
|
redcarpet
|
@@ -0,0 +1,40 @@
|
|
1
|
+
class Tawork.Views.CompareView extends Backbone.View
|
2
|
+
events:
|
3
|
+
"click .change-item": "scroll_to_change"
|
4
|
+
|
5
|
+
initialize: (options = {}) ->
|
6
|
+
$('.nav.nav-pills li a').click (e) ->
|
7
|
+
e.preventDefault()
|
8
|
+
$(this).tab('show')
|
9
|
+
@setup_change_list()
|
10
|
+
|
11
|
+
setup_change_list: ->
|
12
|
+
$changes = $("[changeid][id]")
|
13
|
+
console.log $changes
|
14
|
+
change_ids = []
|
15
|
+
$changes.each (index, change) ->
|
16
|
+
$change = $(change)
|
17
|
+
|
18
|
+
$li = $("<li/>", class: "page-list-item")
|
19
|
+
id = $change.attr("id")
|
20
|
+
if id.indexOf("added") != -1
|
21
|
+
name = "Added"
|
22
|
+
else
|
23
|
+
name = "Removed"
|
24
|
+
|
25
|
+
$link = $("<a/>", href: "#", class: "change-item").html(name).attr("data-id", $change.attr("id"))
|
26
|
+
$li.append $link
|
27
|
+
$(".compare-change-list").append($li)
|
28
|
+
|
29
|
+
scroll_to_change: (event) ->
|
30
|
+
$diff_link = @$("a[href='#version-diff']")
|
31
|
+
|
32
|
+
if !$diff_link.closest("li").hasClass("active")
|
33
|
+
$diff_link.click()
|
34
|
+
|
35
|
+
$link = $(event.target).closest("a")
|
36
|
+
$change = $("#" + $link.attr("data-id"))
|
37
|
+
$changes = $("[changeid=" + $link.attr("data-id") + "], [changeid=" + $link.attr("data-id") + "] img")
|
38
|
+
$(document).scrollTo $change, 100, onAfter: ->
|
39
|
+
$changes.effect("highlight")
|
40
|
+
false
|
@@ -237,6 +237,9 @@ li.mjs-nestedSortable-expanded
|
|
237
237
|
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6
|
238
238
|
font-family: "Ubuntu", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif
|
239
239
|
|
240
|
+
img
|
241
|
+
max-width: 100%
|
242
|
+
|
240
243
|
.content-description
|
241
244
|
clear: both
|
242
245
|
|
@@ -313,8 +316,6 @@ div.tokenfield.form-control
|
|
313
316
|
|
314
317
|
.compare-column
|
315
318
|
min-height: 300px
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
width: 100%
|
320
|
-
max-width: 100%
|
319
|
+
// img
|
320
|
+
// width: 100%
|
321
|
+
// max-width: 100%
|
@@ -1,4 +1,19 @@
|
|
1
|
-
.col-md-
|
1
|
+
.col-md-3.sidebar
|
2
|
+
%br/
|
3
|
+
%ul.nav.nav-pills{style: "margin-left: 10px"}
|
4
|
+
%li
|
5
|
+
%a{href: "#version-previous"} Previous Version
|
6
|
+
%li.active
|
7
|
+
%a{href: "#version-diff"} Diff
|
8
|
+
%li
|
9
|
+
%a{href: "#version-new"} Applied Changes
|
10
|
+
|
11
|
+
%ul.nav.nav-list.nav-list-panel.compare-change-list
|
12
|
+
%li.nav-header
|
13
|
+
Change List
|
14
|
+
|
15
|
+
|
16
|
+
.col-md-9.col-md-offset-3
|
2
17
|
- page_title = title "Comparing version #{params[:version]} for #{@page.title}"
|
3
18
|
= render 'breadcrumb', link_last: true
|
4
19
|
|
@@ -10,9 +25,16 @@
|
|
10
25
|
|
11
26
|
%hr/
|
12
27
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
28
|
+
.col-md-9.col-md-offset-3
|
29
|
+
|
30
|
+
%hr/
|
31
|
+
|
32
|
+
.col-md-9.col-md-offset-3.compare-column
|
17
33
|
#wiki-content.wiki-content.content-description
|
18
|
-
|
34
|
+
.tab-content
|
35
|
+
#version-previous.tab-pane.fade
|
36
|
+
= raw @old_html
|
37
|
+
#version-diff.tab-pane.fade.active.in
|
38
|
+
= raw @diff_html
|
39
|
+
#version-new.tab-pane.fade
|
40
|
+
= raw @new_html
|
data/lib/tawork/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tawork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.39
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adnan Ali
|
@@ -47,6 +47,7 @@ files:
|
|
47
47
|
- app/assets/javascripts/backbone/templates/.gitkeep
|
48
48
|
- app/assets/javascripts/backbone/views/.gitkeep
|
49
49
|
- app/assets/javascripts/backbone/views/attachment.js.coffee
|
50
|
+
- app/assets/javascripts/backbone/views/compare.js.coffee
|
50
51
|
- app/assets/javascripts/backbone/views/page.js.coffee
|
51
52
|
- app/assets/javascripts/backbone/views/ticket.js.coffee
|
52
53
|
- app/assets/javascripts/backbone/views/tree_node_page.js.coffee
|