Skip to content

Commit

Permalink
hotfix: #47| Floating database name
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-null committed Sep 12, 2016
1 parent 28e08a5 commit 937517c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 30 deletions.
2 changes: 1 addition & 1 deletion app/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "__MSG_appName__",
"short_name": "__MSG_appShortName__",
"version": "2.0.1",
"version": "2.0.2",
"manifest_version": 2,
"description": "__MSG_appDescription__",
"icons": {
Expand Down
4 changes: 3 additions & 1 deletion app/sc_ext/modules/databaseName/DatabaseNameModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ namespace SitecoreExtensions.Modules.DatabaseName {
adDbNameToHeader(dbName: string): void {
var dbnameDiv = HTMLHelpers.createElement<HTMLDivElement>('div', { class: 'sc-ext-dbName' });
dbnameDiv.innerText = dbName;
document.querySelector('.sc-globalHeader-loginInfo').parentNode.appendChild(dbnameDiv);

let destination = document.querySelector('.sc-globalHeader');
destination.insertBefore(dbnameDiv, destination.firstChild);
}

canExecute(): boolean {
Expand Down
31 changes: 3 additions & 28 deletions app/sc_ext/styles/databaseName.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,7 @@ $break-small: 550px;
$break-tiny: 390px;

.sc-ext-dbName {
float: left;
margin-left: -10%;
}

@media only screen and (max-width: $break-medium) {
.sc-ext-dbName {
margin-left: -30px;
}
.col-md-6 .sc-ext-dbName {
padding-left: 40%;
margin-left: 0px;
}
}

@media only screen and (max-width: $break-small) {
.sc-ext-dbName {
margin-left: -50%;
}
.col-md-6 .sc-ext-dbName {
padding-left: 25%;
margin-left: 0px;
}
}

@media only screen and (max-width: $break-tiny) {
.sc-ext-dbName {
display: none;
}
position: fixed;
width: 100%;
text-align: center;
}

0 comments on commit 937517c

Please sign in to comment.