Merge pull request #2752 from ecordell/ecordell/QUAY-696/fix-markdown-editors
Switch to new markdown editor everywhere
This commit is contained in:
commit
b6476ea9f4
7 changed files with 47 additions and 13 deletions
|
@ -19,7 +19,7 @@
|
||||||
<td class="message-content">
|
<td class="message-content">
|
||||||
<span ng-switch on="message.media_type">
|
<span ng-switch on="message.media_type">
|
||||||
<span ng-switch-when="text/markdown">
|
<span ng-switch-when="text/markdown">
|
||||||
<span class="markdown-view" content="message.content"></span>
|
<markdown-view content="message.content"></markdown-view>
|
||||||
</span>
|
</span>
|
||||||
<span ng-switch-default>{{ message.content }}</span>
|
<span ng-switch-default>{{ message.content }}</span>
|
||||||
</span>
|
</span>
|
||||||
|
@ -81,7 +81,10 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<label>Message</label>
|
<label>Message</label>
|
||||||
<div class="markdown-editor" content="newMessage.content"></div>
|
<markdown-input content="newMessage.content"
|
||||||
|
can-write="true"
|
||||||
|
(content-changed)="updateMessage($event.content)"
|
||||||
|
field-title="message"></markdown-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer" ng-show="createdMessage">
|
<div class="modal-footer" ng-show="createdMessage">
|
||||||
|
|
|
@ -76,7 +76,10 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><label for="create-key-notes">Approval Notes (optional):</label></td>
|
<td><label for="create-key-notes">Approval Notes (optional):</label></td>
|
||||||
<td>
|
<td>
|
||||||
<div class="markdown-editor" content="preshared.notes"></div>
|
<markdown-input content="preshared.notes"
|
||||||
|
can-write="true"
|
||||||
|
(content-changed)="updateNotes($event.content)"
|
||||||
|
field-title="notes"></markdown-input>
|
||||||
<span class="co-help-text">
|
<span class="co-help-text">
|
||||||
Optional notes for additional human-readable information about why the key was created.
|
Optional notes for additional human-readable information about why the key was created.
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -251,7 +251,10 @@
|
||||||
<li ng-repeat="key in approveKeysInfo.keys">{{ getKeyTitle(key) }}</li>
|
<li ng-repeat="key in approveKeysInfo.keys">{{ getKeyTitle(key) }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="markdown-editor" content="approveKeysInfo.notes"></div>
|
<markdown-input content="approveKeysInfo.notes"
|
||||||
|
can-write="true"
|
||||||
|
(content-changed)="updateApproveKeysInfoNotes($event.content)"
|
||||||
|
field-title="notes"></markdown-input>
|
||||||
<span class="co-help-text">
|
<span class="co-help-text">
|
||||||
Enter optional notes for additional human-readable information about why the keys were approved.
|
Enter optional notes for additional human-readable information about why the keys were approved.
|
||||||
</span>
|
</span>
|
||||||
|
@ -268,7 +271,10 @@
|
||||||
<div style="margin-bottom: 10px;">
|
<div style="margin-bottom: 10px;">
|
||||||
Approve service key <strong>{{ getKeyTitle(approvalKeyInfo.key) }}</strong>?
|
Approve service key <strong>{{ getKeyTitle(approvalKeyInfo.key) }}</strong>?
|
||||||
</div>
|
</div>
|
||||||
<div class="markdown-editor" content="approvalKeyInfo.notes"></div>
|
<markdown-input content="approvalKeysInfo.notes"
|
||||||
|
can-write="true"
|
||||||
|
(content-changed)="updateApprovalKeyInfoNotes($event.content)"
|
||||||
|
field-title="notes"></markdown-input>
|
||||||
<span class="co-help-text">
|
<span class="co-help-text">
|
||||||
Enter optional notes for additional human-readable information about why the key was approved.
|
Enter optional notes for additional human-readable information about why the key was approved.
|
||||||
</span>
|
</span>
|
||||||
|
@ -344,7 +350,10 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><label for="create-key-notes">Approval Notes:</label></td>
|
<td><label for="create-key-notes">Approval Notes:</label></td>
|
||||||
<td>
|
<td>
|
||||||
<div class="markdown-editor" content="newKey.notes"></div>
|
<markdown-input content="newKey.notes"
|
||||||
|
can-write="true"
|
||||||
|
(content-changed)="updateNewKeyNotes($event.content)"
|
||||||
|
field-title="notes"></markdown-input>
|
||||||
<span class="co-help-text">
|
<span class="co-help-text">
|
||||||
Optional notes for additional human-readable information about why the key was added.
|
Optional notes for additional human-readable information about why the key was added.
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -38,16 +38,16 @@ angular.module('quay').directive('globalMessageTab', function () {
|
||||||
|
|
||||||
ApiService.createGlobalMessage(data, null).then(function (resp) {
|
ApiService.createGlobalMessage(data, null).then(function (resp) {
|
||||||
$scope.creatingMessage = false;
|
$scope.creatingMessage = false;
|
||||||
$scope.newMessage = {
|
|
||||||
'media_type': 'text/markdown',
|
|
||||||
'severity': 'info'
|
|
||||||
};
|
|
||||||
|
|
||||||
$('#createMessageModal').modal('hide');
|
$('#createMessageModal').modal('hide');
|
||||||
$scope.loadMessageInternal();
|
$scope.loadMessageInternal();
|
||||||
}, errorHandler)
|
}, errorHandler)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.updateMessage = function(content) {
|
||||||
|
$scope.newMessage.content = content;
|
||||||
|
};
|
||||||
|
|
||||||
$scope.showDeleteMessage = function (uuid) {
|
$scope.showDeleteMessage = function (uuid) {
|
||||||
$scope.messageToDelete = uuid;
|
$scope.messageToDelete = uuid;
|
||||||
$('#confirmDeleteMessageModal').modal({});
|
$('#confirmDeleteMessageModal').modal({});
|
||||||
|
|
|
@ -109,6 +109,10 @@ angular.module('quay').directive('requestServiceKeyDialog', function () {
|
||||||
}, ApiService.errorDisplay('Could not create service key'));
|
}, ApiService.errorDisplay('Could not create service key'));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.updateNotes = function(content) {
|
||||||
|
$scope.preshared.notes = content;
|
||||||
|
};
|
||||||
|
|
||||||
$scope.$watch('requestKeyInfo', function(info) {
|
$scope.$watch('requestKeyInfo', function(info) {
|
||||||
if (info && info.service) {
|
if (info && info.service) {
|
||||||
$scope.show();
|
$scope.show();
|
||||||
|
|
|
@ -31,8 +31,11 @@
|
||||||
<span class="avatar" data="result.namespace.avatar" size="16"></span>
|
<span class="avatar" data="result.namespace.avatar" size="16"></span>
|
||||||
<span class="result-name">{{ result.namespace.name }}/{{ result.name }}</span>
|
<span class="result-name">{{ result.namespace.name }}/{{ result.name }}</span>
|
||||||
<div class="result-description" ng-if="result.description">
|
<div class="result-description" ng-if="result.description">
|
||||||
<div class="description markdown-view" content="result.description"
|
<div class="description">
|
||||||
first-line-only="true" placeholder-needed="false"></div>
|
<markdown-view content="result.description"
|
||||||
|
first-line-only="true"
|
||||||
|
placeholder-needed="false"></markdown-view>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
<span ng-switch-when="application">
|
<span ng-switch-when="application">
|
||||||
|
|
|
@ -169,6 +169,10 @@ angular.module('quay').directive('serviceKeysManager', function () {
|
||||||
}, ApiService.errorDisplay('Could not create service key'));
|
}, ApiService.errorDisplay('Could not create service key'));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.updateNewKeyNotes = function(content) {
|
||||||
|
$scope.newKey.notes = content;
|
||||||
|
};
|
||||||
|
|
||||||
$scope.showApproveKey = function(key) {
|
$scope.showApproveKey = function(key) {
|
||||||
$scope.approvalKeyInfo = {
|
$scope.approvalKeyInfo = {
|
||||||
'key': key,
|
'key': key,
|
||||||
|
@ -196,6 +200,10 @@ angular.module('quay').directive('serviceKeysManager', function () {
|
||||||
}, errorHandler);
|
}, errorHandler);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.updateApprovalKeyInfoNotes = function(content) {
|
||||||
|
$scope.approvalKeyInfo.notes = content;
|
||||||
|
};
|
||||||
|
|
||||||
$scope.showCreateKey = function() {
|
$scope.showCreateKey = function() {
|
||||||
$scope.newKey = {
|
$scope.newKey = {
|
||||||
'expiration': null
|
'expiration': null
|
||||||
|
@ -352,6 +360,10 @@ angular.module('quay').directive('serviceKeysManager', function () {
|
||||||
forAllKeys(info.keys, 'Could not approve service key', performer, callback);
|
forAllKeys(info.keys, 'Could not approve service key', performer, callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.updateApproveKeysInfoNotes = function(content) {
|
||||||
|
$scope.approveKeysInfo.notes = content;
|
||||||
|
};
|
||||||
|
|
||||||
$scope.changeKeysExpiration = function(info, callback) {
|
$scope.changeKeysExpiration = function(info, callback) {
|
||||||
var performer = function(key) {
|
var performer = function(key) {
|
||||||
var data = {
|
var data = {
|
||||||
|
|
Reference in a new issue