-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Further progress on the localizations-input directive. Finished most …
…of the directive implementation
- Loading branch information
Showing
7 changed files
with
125 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 10 additions & 61 deletions
71
app/src/common/directives/localizableInput/dialog/localizableInputDialog.tpl.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,33 @@ | ||
<md-dialog flex="80" id="localizableInputDialog"> | ||
<md-dialog flex="50" id="localizableInputDialog"> | ||
<md-toolbar> | ||
<div class="md-toolbar-tools"> | ||
<h2>Select Media</h2> | ||
<h2>Translate</h2> | ||
<span flex></span> | ||
<md-button class="md-icon-button" ng-click="LocalizableInputDialogController.cancelDialog()"> | ||
<md-icon aria-label="Close dialog">close</md-icon> | ||
</md-button> | ||
</div> | ||
</md-toolbar> | ||
<md-dialog-content> | ||
<p ng-bind-html="LocalizableInputDialogController.originalValue"></p> | ||
|
||
<md-tabs md-selected="LocalizableInputDialogController.selectedIndex" md-dynamic-height md-border-bottom md-autoselect> | ||
<md-tab label="Upload new"> | ||
<md-tab label="{{region.name}}"ng-repeat="region in LocalizableInputDialogController.regionService.supportedRegions"> | ||
|
||
<upload-image ng-if="!LocalizableInputDialogController.selectedImage" ng-model="LocalizableInputDialogController.selectedImage"></upload-image> | ||
|
||
<dl ng-if="LocalizableInputDialogController.selectedImage"> | ||
<dt>Image</dt> | ||
<dd> | ||
<cl-image public-id="{{LocalizableInputDialogController.selectedImage.imageId}}" format="{{LocalizableInputDialogController.selectedImage.format}}"> | ||
<cl-transformation height="300" width="300" crop="fill" gravity="north"/> | ||
</cl-image> | ||
</dd> | ||
<dt>Alt</dt> | ||
<dd>{{LocalizableInputDialogController.selectedImage.alt}}</dd> | ||
<dt>Title</dt> | ||
<dd>{{LocalizableInputDialogController.selectedImage.title}}</dd> | ||
</dl> | ||
<md-input-container flex ng-switch="LocalizableInputDialogController.inputNodeName"> | ||
<textarea ng-switch-when="textarea" ng-model="LocalizableInputDialogController.localizationMap[region.code]"></textarea> | ||
<input ng-switch-when="input" ng-model="LocalizableInputDialogController.localizationMap[region.code]"> | ||
<markdown-editor ng-switch-when="markdown-editor" ng-model="testModel"></markdown-editor> | ||
</md-input-container> | ||
|
||
</md-tab> | ||
<md-tab label="Select From Library"> | ||
|
||
<md-grid-list | ||
md-cols-sm="1" | ||
md-cols-md="2" | ||
md-cols-gt-md="4" | ||
md-row-height="1:1" | ||
md-gutter="12px" | ||
md-gutter-gt-sm="8px"> | ||
|
||
<md-grid-tile | ||
ng-repeat="image in LocalizableInputDialogController.library" | ||
ng-click="LocalizableInputDialogController.toggleImageSelection(image)" | ||
md-ink-ripple style="cursor:pointer" | ||
ng-class="{'selected':LocalizableInputDialogController.selectedImage == image}" | ||
> | ||
|
||
<md-grid-tile-header> | ||
<h3>{{image.alt | uppercase}}</h3> | ||
</md-grid-tile-header> | ||
|
||
<cl-image width="100%" public-id="{{image.imageId}}" format="{{image.format}}"> | ||
<cl-transformation height="300" width="300" crop="fill" gravity="north"/> | ||
</cl-image> | ||
|
||
<md-grid-tile-footer ng-if="!!image.title"> | ||
<h3>{{image.title}}</h3> | ||
</md-grid-tile-footer> | ||
</md-grid-tile> | ||
|
||
</md-grid-list> | ||
|
||
<md-toolbar> | ||
<md-tabs md-dynamic-height md-selected="LocalizableInputDialogController.currentPageIndex"> | ||
|
||
<md-tab ng-repeat="pageNumber in LocalizableInputDialogController.pages" | ||
ng-click="LocalizableInputDialogController.goToPage(pageNumber)" | ||
label="{{pageNumber}}"> | ||
</md-tab> | ||
|
||
</md-tabs> | ||
</md-toolbar> | ||
|
||
</md-tab> | ||
</md-tabs> | ||
|
||
</md-dialog-content> | ||
|
||
<div class="md-actions"> | ||
<md-button ng-disabled="!LocalizableInputDialogController.selectedImage" ng-click="LocalizableInputDialogController.selectImage()" class="md-primary">Select Image</md-button> | ||
<md-button ng-click="LocalizableInputDialogController.saveLocalizations()" class="md-primary">Save</md-button> | ||
<md-button ng-click="LocalizableInputDialogController.cancelDialog()" class="md-warn">Cancel</md-button> | ||
</div> | ||
</md-dialog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
app/src/common/directives/localizableInput/localizableInput.tpl.html
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.