diff --git a/src/app/system-apps/filemanager/file.manager.validator.ts b/src/app/system-apps/filemanager/file.manager.validator.ts new file mode 100644 index 00000000..c8655464 --- /dev/null +++ b/src/app/system-apps/filemanager/file.manager.validator.ts @@ -0,0 +1,14 @@ +import {AbstractControl, ValidatorFn} from '@angular/forms'; + +export class CustomValidator{ + + static invalidCharacters(): ValidatorFn { + return(c: AbstractControl): {[key: string]: boolean } | null =>{ + const invalidChars:string[] = ['#','%','&','{','}','|','\\','<','>','*','?','/','','$','!',"'",'"',':','@','+','`','='] + if(!invalidChars.includes(c.value)){ + return {'value': true} + } + return null; + } + } +} \ No newline at end of file diff --git a/src/app/system-apps/filemanager/filemanager.component.css b/src/app/system-apps/filemanager/filemanager.component.css index ec4a5e85..064c226e 100644 --- a/src/app/system-apps/filemanager/filemanager.component.css +++ b/src/app/system-apps/filemanager/filemanager.component.css @@ -135,17 +135,26 @@ span.tail{ min-width: 18px; } - .rename-textbox{ position: relative; + display: none; top: 2px; margin-bottom: 2px; max-width: 75px; max-height: 16px; - border: 1px solid #333; - font-size: 11.5px; - z-index: 3; + border: 1px solid #ccc; overflow:hidden; - display: none; - text-align: center; - } \ No newline at end of file + z-index: 2; + } + + input { + text-align:calc(75px / 2 px); + font-size: 11.5px; + /* text-overflow:ellipsis; */ + padding-left: 4px; +} + +input::selection{ + background-color: #0056b3; + color: #fff; +} \ No newline at end of file diff --git a/src/app/system-apps/filemanager/filemanager.component.html b/src/app/system-apps/filemanager/filemanager.component.html index 8c746668..63f01cea 100644 --- a/src/app/system-apps/filemanager/filemanager.component.html +++ b/src/app/system-apps/filemanager/filemanager.component.html @@ -1,9 +1,9 @@ -