Skip to content

Commit 9209b62

Browse files
author
FezVrasta
committed
Prepared ftp.less for Sprint 38, improved less.
1 parent 630ac49 commit 9209b62

6 files changed

Lines changed: 42 additions & 20 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
/npm-debug.log
44
/less/fonts/octicon.css
55
/git.log
6+
/src/Ftp/styles/ftp.css

htmlContent/git-remotes-picker.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{#remotes}}
33
<li class="remote">
44
<a href="#" data-remote-name="{{name}}" data-type="git" class="remote-name">
5-
{{#deletable}}<span class="trash-icon remove-remote">&times;</span>{{/deletable}}
5+
{{#deletable}}<span class="trash-icon hover-icon remove-remote">&times;</span>{{/deletable}}
66
<span class="change-remote">{{name}}</span>
77
</a>
88
</li>

less/brackets-git.less

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240
display: inline-block;
241241
width: 100%;
242242
}
243-
.trash-icon, .gitftp-init-remote {
243+
.hover-icon {
244244
opacity: 0;
245245
background-image: none !important;
246246
width: 16px;
@@ -254,22 +254,11 @@
254254
font-weight: bold;
255255
}
256256
}
257-
.gitftp-init-remote {
258-
position: relative;
259-
top: 2px;
260-
right: 4px;
261-
}
262-
&:hover .trash-icon, &:hover .gitftp-init-remote {
257+
&:hover .hover-icon {
263258
opacity: 1;
264259
}
265260
}
266261

267-
a[data-type=ftp] .change-remote:before, span[data-type=ftp]:before {
268-
content: "FTP:";
269-
padding-right: 5px;
270-
opacity: 0.5;
271-
}
272-
273262
.dropdown-menu {
274263
border: none;
275264
border-radius: @tc-control-border-radius;
@@ -304,7 +293,7 @@
304293
cursor: default;
305294
}
306295

307-
.gitftp-remote-new, .git-remote-new {
296+
li:not(".remote"):not(".divider"):not(".dropdown-header") > a {
308297
font-style: italic;
309298
}
310299
}
@@ -344,6 +333,22 @@
344333
background-repeat: repeat;
345334
-webkit-animation: btn-loading 1s linear infinite;
346335
}
336+
337+
// Git-FTP styles, will be removed after S38, see /src/Ftp/styles/ftp.less
338+
.git-remotes-dropdown {
339+
.gitftp-init-remote {
340+
position: relative;
341+
top: 2px;
342+
right: 4px;
343+
}
344+
}
345+
346+
a[data-type=ftp] .change-remote:before, span[data-type=ftp]:before {
347+
content: "FTP:";
348+
padding-right: 5px;
349+
opacity: 0.5;
350+
}
351+
347352
}
348353

349354
@-webkit-keyframes btn-loading {

src/Ftp/Ftp.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ define(function (require) {
2424

2525
var attachEvents = _.once(function () {
2626
$gitPanel
27-
.on("click", ".gitftp-remote-new", handleGitFtpScopeCreation)
27+
.on("click", ".gitftp-remote-new", function () { handleGitFtpScopeCreation(); })
2828
.on("click", ".gitftp-remove-remote", function () { handleGitFtpScopeRemove($(this)); })
2929
.on("click", ".gitftp-init-remote", function () { handleGitFtpInitScope($(this)); })
3030
.on("click", ".gitftp-push", handleGitFtpPush);
@@ -150,8 +150,7 @@ define(function (require) {
150150
{booleanResponse: true}
151151
).then(function (response) {
152152
if (response) {
153-
return GitFtp.init(scopeName).then(function () {
154-
}).catch(function (err) {
153+
return GitFtp.init(scopeName).catch(function (err) {
155154
ErrorHandler.showError(err, "Init scope failed");
156155
});
157156
}

src/Ftp/styles/ftp.less

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#git-panel {
2+
3+
.git-remotes-dropdown {
4+
.gitftp-init-remote {
5+
position: relative;
6+
top: 2px;
7+
right: 4px;
8+
}
9+
}
10+
11+
a[data-type=ftp] .change-remote:before, span[data-type=ftp]:before {
12+
content: "FTP:";
13+
padding-right: 5px;
14+
opacity: 0.5;
15+
}
16+
17+
}

src/Ftp/templates/remotes-picker.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
{{#ftpScopes}}
55
<li class="gitftp-remote">
66
<a href="#" data-remote-name="{{name}}" data-type="ftp" class="remote-name">
7-
<span class="trash-icon gitftp-remove-remote">&times;</span>
7+
<span class="trash-icon hover-icon gitftp-remove-remote">&times;</span>
88
<span class="change-remote">{{name}}</span>
9-
<span class="octicon octicon-arrow-up gitftp-init-remote" title="{{Strings.INIT_GITFTP_SCOPE}}"></span>
9+
<span class="octicon hover-icon octicon-arrow-up gitftp-init-remote" title="{{Strings.INIT_GITFTP_SCOPE}}"></span>
1010
</a>
1111
</li>
1212
{{/ftpScopes}}

0 commit comments

Comments
 (0)