Skip to content

Commit fbd071b

Browse files
author
Matt Karl
committed
Add the project display name
1 parent 6c0c5fd commit fbd071b

File tree

4 files changed

+59
-2
lines changed

4 files changed

+59
-2
lines changed

deploy/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
<span class="icon glyphicon glyphicon-remove"></span> Close
2424
</button>
2525
</nav>
26+
<div class="project empty" id="project">
27+
<div class="name" id="projectName"></div>
28+
<div class="empty">No project opened</div>
29+
</div>
2630
<div class="modules btn-group-vertical">
2731
<a class="btn btn-primary btn-lg requires-project" href="captions.html" id="captions" target="_blank" title="Caption Creator" data-width="640" data-height="480" data-min-width="510" data-min-height="400">
2832
Caption Creator

deploy/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"frame": true,
1616
"position": "center",
1717
"width": 340,
18-
"height": 390,
18+
"height": 435,
1919
"resizable": false
2020
},
2121
"webkit": {

src/springroll/SpringRollStudio.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@
3030
this.requiresProject = $(".requires-project")
3131
.addClass('disabled');
3232

33+
/**
34+
* The current project name
35+
* @property {jquery} projectName
36+
*/
37+
this.projectName = $("#projectName");
38+
39+
/**
40+
* The current project name
41+
* @property {jquery} project
42+
*/
43+
this.project = $("#project");
44+
3345
if (APP)
3446
{
3547
this.menu = new gui.Menu({ type: 'menubar' });
@@ -125,7 +137,10 @@
125137
alert("Folder is not a valid SpringRoll project");
126138
return;
127139
}
140+
this.projectName.text(path.basename(project));
141+
this.project.removeClass('empty');
128142
this.closeButton.removeClass('disabled');
143+
129144
if (localStorage.getItem('project') != project)
130145
{
131146
localStorage.setItem('project', project);
@@ -139,6 +154,8 @@
139154
*/
140155
p.closeProject = function()
141156
{
157+
this.projectName.text('');
158+
this.project.addClass('empty');
142159
this.requiresProject.addClass('disabled');
143160
this.closeButton.addClass('disabled');
144161
localStorage.removeItem('project');

src/springroll/SpringRollStudio.less

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,36 @@ body {
1919
}
2020
}
2121

22+
.project {
23+
background:#363842;
24+
padding:10px 0;
25+
border-radius: 4px;
26+
border-top-left-radius: 0;
27+
border-top-right-radius: 0;
28+
text-align: center;
29+
margin:0 10px;
30+
width:auto;
31+
color:#fff;
32+
border:0;
33+
.name:before {
34+
content:"Project:";
35+
margin-right:5px;
36+
color:#999;
37+
}
38+
.empty {
39+
display:none;
40+
color:#999;
41+
}
42+
&.empty {
43+
.empty {
44+
display:block;
45+
}
46+
.name {
47+
display:none;
48+
}
49+
}
50+
}
51+
2252
header {
2353
.logo {
2454
display:block;
@@ -35,11 +65,17 @@ input[type="file"] {
3565

3666
nav {
3767
.btn {
38-
width:33.333%;
68+
width:33.5%;
3969
text-align:center;
4070
.icon {
4171
margin-right:5px;
4272
}
73+
&:first-child {
74+
border-bottom-left-radius: 0;
75+
}
76+
&:last-child {
77+
border-bottom-right-radius: 0;
78+
}
4379
}
4480
}
4581

0 commit comments

Comments
 (0)