Skip to content

Commit d22f445

Browse files
committed
move web-view to attr
1 parent 655cadb commit d22f445

4 files changed

Lines changed: 54 additions & 54 deletions

File tree

client/directives/activePanel/viewActivePanel.jade

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ pre.pre(
3232
)
3333
span.js-char-width 0
3434

35-
web-view(
35+
.web-container(
36+
web-view
3637
ng-if = "item.state.type === 'WebView'"
3738
)
3839

client/directives/webView/directiveWebView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function webView(
1515
user
1616
) {
1717
return {
18-
restrict: 'E',
18+
restrict: 'A',
1919
templateUrl: 'viewWebView',
2020
scope: {},
2121
link: function ($scope, elem) {
Lines changed: 50 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,54 @@
1-
.web-container
2-
//- .browser-loading to toggle refresh/stop icon
3-
//- .browser-loading is also required for the progress bar, so remove it when loading is complete
4-
//- nav buttons removed until we can resolve cross-origin issues
5-
nav.browser-chrome
6-
//- apply [disabled] to back/forward to disable
1+
//- .browser-loading to toggle refresh/stop icon
2+
//- .browser-loading is also required for the progress bar, so remove it when loading is complete
3+
//- nav buttons removed until we can resolve cross-origin issues
4+
nav.browser-chrome
5+
//- apply [disabled] to back/forward to disable
6+
button.btn-icon(
7+
ng-click = "actions.back()"
8+
ng-if = "false"
9+
type = "button"
10+
)
11+
svg.iconnables.icons-chevron-left
12+
use(xlink:href = "#icons-chevron-left")
13+
button.btn-icon(
14+
ng-click = "actions.forward()"
15+
ng-if = "false"
16+
type = "button"
17+
)
18+
svg.iconnables.icons-chevron-right
19+
use(xlink:href = "#icons-chevron-right")
20+
.iconnables.iconnables-container(
21+
ng-if = "false"
22+
)
723
button.btn-icon(
8-
ng-click = "actions.back()"
9-
ng-if = "false"
1024
type = "button"
25+
ng-click = "actions.refresh()"
1126
)
12-
svg.iconnables.icons-chevron-left
13-
use(xlink:href = "#icons-chevron-left")
14-
button.btn-icon(
15-
ng-click = "actions.forward()"
16-
ng-if = "false"
17-
type = "button"
18-
)
19-
svg.iconnables.icons-chevron-right
20-
use(xlink:href = "#icons-chevron-right")
21-
.iconnables.iconnables-container(
22-
ng-if = "false"
23-
)
24-
button.btn-icon(
25-
type = "button"
26-
ng-click = "actions.refresh()"
27-
)
28-
svg.iconnables.icons-refresh
29-
use(xlink:href = "#icons-refresh")
30-
button.btn-icon(type = "button")
31-
svg.iconnables.icons-stop
32-
use(xlink:href = "#icons-stop")
33-
//- select all text on click
34-
//- inline styles with apologies to Tony
35-
a(
36-
ng-href = "{{ data.iframeUrl }}"
37-
target = "_blank"
38-
style = "width: 100%"
27+
svg.iconnables.icons-refresh
28+
use(xlink:href = "#icons-refresh")
29+
button.btn-icon(type = "button")
30+
svg.iconnables.icons-stop
31+
use(xlink:href = "#icons-stop")
32+
//- select all text on click
33+
//- inline styles with apologies to Tony
34+
a(
35+
ng-href = "{{ data.iframeUrl }}"
36+
target = "_blank"
37+
style = "width: 100%"
38+
)
39+
input.form-control(
40+
placeholder = "Enter an address"
41+
readonly
42+
value = "{{ data.iframeUrl }}"
43+
style = "width: inherit"
3944
)
40-
input.form-control(
41-
placeholder = "Enter an address"
42-
readonly
43-
value = "{{ data.iframeUrl }}"
44-
style = "width: inherit"
45-
)
46-
//- style="-webkit-transform: scale3d(%,1,1); transform: scale3d(%,1,1);" to move progress bar--% is the total progress out of 1.00
47-
//- http://caniuse.com/#search=transform (Current and previous versions, July 2014):
48-
//- * chrome 35
49-
//- * safari 6.1, 7, 8
50-
//- * android 4.2, 4.3, 4.4
51-
.progress
52-
//- box log and terminal tab should open by default
53-
iframe(
54-
ng-src = "{{ data.iframeUrl }}"
55-
)
45+
//- style="-webkit-transform: scale3d(%,1,1); transform: scale3d(%,1,1);" to move progress bar--% is the total progress out of 1.00
46+
//- http://caniuse.com/#search=transform (Current and previous versions, July 2014):
47+
//- * chrome 35
48+
//- * safari 6.1, 7, 8
49+
//- * android 4.2, 4.3, 4.4
50+
.progress
51+
//- box log and terminal tab should open by default
52+
iframe(
53+
ng-src = "{{ data.iframeUrl }}"
54+
)

test/unit/directives/directiveWebView.unit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ describe('directiveWebView'.bold.underline.blue, function() {
8484

8585
beforeEach(function() {
8686
ctx = {};
87-
ctx.template = directiveTemplate('web-view');
87+
ctx.template = directiveTemplate.attribute('web-view');
8888
});
8989

9090
beforeEach(injectSetupCompile);

0 commit comments

Comments
 (0)