Skip to content

Commit

Permalink
#14 added logic to clear the input and fixed button styles
Browse files Browse the repository at this point in the history
  • Loading branch information
skuzniak committed May 30, 2016
1 parent b562e54 commit accd420
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
Binary file added app/images/ic_close_black_24dp_1x-b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/ic_close_black_24dp_2x-brighter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@
"styles/main.css",
"scripts/sc_ext-common.js",
"scripts/fuzzy.min.js",
"images/ic_close_black_24dp_1x.png"
"images/ic_close_black_24dp_1x-b.png"
]
}
8 changes: 4 additions & 4 deletions app/scripts.ts/sc_ext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,8 @@ namespace SitecoreExtensions.Modules.FieldSearch {
};

private createClearButton(text: string): HTMLSpanElement {
// var iconUrl = chrome.extension.getURL("images/myimage.png");
var closeButton = HTMLHelpers.createElement<HTMLSpanElement>('span', {
class: 'sc-ext-fieldSearchClear',
// style: "url('" + iconUrl + "') 0 -690px;"
class: 'sc-ext-fieldSearchClear'
});
var data = this;
closeButton.onclick = (e: MouseEvent) => {
Expand Down Expand Up @@ -300,7 +298,9 @@ namespace SitecoreExtensions.Modules.FieldSearch {
};

clearSearch(e: MouseEvent) : void {

var char = document.getElementById("scextFieldSearch");
(<HTMLInputElement>char).value = "";
this.toggleSections(false);
}

addTreeNodeHandlers(className: string): void {
Expand Down
14 changes: 8 additions & 6 deletions app/styles.sass/fieldSearch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ span.sc-ext-searchFieldContainer {
span.sc-ext-fieldSearchClear {
position: absolute;
display: block;
top: 0px;
right: 20px;
width: 16px;
height: 16px;
// background-image:url('chrome-extension://__MSG_@@extension_id__/images/ic_close_black_24dp_1x.png') 0 -690px;
background: url('chrome-extension://__MSG_@@extension_id__/images/ic_close_black_24dp_1x.png') -5px -5px;
border-top: 6px solid white;
border-bottom: 6px solid white;
border-right: 6px solid white;
top: -4px;
right: 11px;
width: 10px;
height: 10px;
background: url('chrome-extension://__MSG_@@extension_id__/images/ic_close_black_24dp_1x-b.png') 17px 17px;
cursor: pointer;
}

Expand Down

0 comments on commit accd420

Please sign in to comment.