Skip to content

Commit 924ca4f

Browse files
benjaminapetersenf0x11
authored andcommitted
Fix issue openshift#1863, kve sort quirks, and bump ng-sortable
- issue openshift#1863 could not pull second-to-last env var below last env var in kve - issue openshift#620 possibly helped (?) - bugzilla #1428991 reordering env vars down only works by twos - example: third moves to fifth, then seventh - bugzilla #1369315 possibly helped (?) I've mentioned 2 additional issues that may be helped by this fix as many quirky behaviors seem to resolve. That said, I will test more before closing them.
1 parent 58ce450 commit 924ca4f

File tree

6 files changed

+41
-34
lines changed

6 files changed

+41
-34
lines changed

app/styles/_kve.less

+13-25
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,6 @@
164164
}
165165
}
166166

167-
.key-value-editor-entry {
168-
display: table;
169-
margin-bottom: 15px;
170-
padding-right: (@as-sortable-item-button-width * 2);
171-
position: relative;
172-
table-layout: fixed;
173-
width: 100%;
174-
}
175167
.key-value-editor-input .ui-select {
176168
@media(min-width: @screen-md-min) {
177169
float: left;
@@ -187,23 +179,19 @@
187179
}
188180
}
189181

190-
.environment-from-editor-header {
191-
&.config-map-header,
192-
&.prefix-header {
193-
@media(max-width: @screen-xxs-max) {
194-
display: none;
195-
width: 100%;
196-
}
197-
&.config-map-header-mobile,
198-
&.prefix-header-mobile {
199-
display: block;
200-
margin-bottom: 0;
201-
margin-top: 5px;
202-
@media(min-width: @screen-xs-min) {
203-
display: none;
204-
}
205-
}
206-
}
182+
.key-value-editor .key-value-editor-input,
183+
.key-value-editor-header {
184+
float: left;
185+
padding-right: 5px;
186+
width: 50%;
187+
}
188+
189+
.key-value-editor-entry-header {
190+
padding-right: (@as-sortable-item-button-width * 2);
191+
}
192+
193+
.key-value-editor-header {
194+
margin-bottom: 5px;
207195
}
208196

209197
.key-value-editor .key-value-editor-input,

app/views/directives/key-value-editor.html

+8-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
<div
44
ng-if="showHeader"
55
class="key-value-editor-entry key-value-editor-entry-header">
6-
<div class="key-value-editor-header key-header">
7-
{{keyPlaceholder}}
6+
<div class="form-group key-value-editor-header key-header">
7+
<div class="input-group">
8+
<span class="help-block">{{keyPlaceholder}}</span>
9+
</div>
810
</div>
9-
<div class="key-value-editor-header value-header">
10-
{{valuePlaceholder}}
11+
<div class="form-group key-value-editor-header value-header">
12+
<div class="input-group">
13+
<span class="help-block">{{valuePlaceholder}}</span>
14+
</div>
1115
</div>
1216
</div>
1317

dist/scripts/scripts.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -27587,10 +27587,13 @@ uniqueForKey: r.uniqueForKey,
2758727587
uniqueForValue: r.uniqueForValue,
2758827588
dragControlListeners: {
2758927589
accept: function(e, t) {
27590-
return e.itemScope.sortableScope.$id === t.$id;
27590+
return console.log("accept?"), e.itemScope.sortableScope.$id === t.$id;
2759127591
},
2759227592
orderChanged: function() {
2759327593
t.forms.keyValueEditor.$setDirty();
27594+
},
27595+
itemMoved: function(e) {
27596+
console.log("itemMoved"), console.log("event", e), console.log("source", e.source), console.log("dest", e.dest), e.source.itemScope.modelValue.status = e.dest.sortableScope.$parent.column.name, t.forms.keyValueEditor.$setDirty();
2759427597
}
2759527598
},
2759627599
deleteEntry: function(e, n) {

dist/scripts/templates.js

+11
Original file line numberDiff line numberDiff line change
@@ -8205,8 +8205,19 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
82058205
$templateCache.put('views/directives/key-value-editor.html',
82068206
"<ng-form name=\"forms.keyValueEditor\" novalidate ng-if=\"entries\">\n" +
82078207
"<div ng-if=\"showHeader\" class=\"key-value-editor-entry key-value-editor-entry-header\">\n" +
8208+
<<<<<<< c496450276b46a24d4cb0af80b3756ee16c504eb
82088209
"<div class=\"key-value-editor-header key-header\">\n" +
82098210
"{{keyPlaceholder}}\n" +
8211+
=======
8212+
"<div class=\"form-group key-value-editor-header key-header\">\n" +
8213+
"<div class=\"input-group\">\n" +
8214+
"<span class=\"help-block\">{{keyPlaceholder}}</span>\n" +
8215+
"</div>\n" +
8216+
"</div>\n" +
8217+
"<div class=\"form-group key-value-editor-header value-header\">\n" +
8218+
"<div class=\"input-group\">\n" +
8219+
"<span class=\"help-block\">{{valuePlaceholder}}</span>\n" +
8220+
>>>>>>> Fix issue #1863, kve sort quirks, and bump ng-sortable
82108221
"</div>\n" +
82118222
"<div class=\"key-value-editor-header value-header\">\n" +
82128223
"{{valuePlaceholder}}\n" +

dist/scripts/vendor.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -115645,7 +115645,6 @@ angular.element(r[0].body).unbind("keydown", H);
115645115645
}), B = function(e) {
115646115646
return "function" == typeof a.sortableScope.options.placeholder ? angular.element(a.sortableScope.options.placeholder(e)) : "string" == typeof a.sortableScope.options.placeholder ? angular.element(a.sortableScope.options.placeholder) : angular.element(r[0].createElement(e.element.prop("tagName")));
115647115647
}, x = function(e) {
115648-
e.preventDefault();
115649115648
var t, i = function() {
115650115649
angular.element(r).unbind("mousemove", o), angular.element(r).unbind("touchmove", o), s.unbind("mouseup", i), s.unbind("touchend", i), s.unbind("touchcancel", i);
115651115650
}, o = function(r) {
@@ -115672,7 +115671,7 @@ var s, l, c, f, m;
115672115671
if ((!M || !n.isTouchInvalid(o)) && N && p) {
115673115672
if (o.preventDefault(), s = n.eventObj(o), a.callbacks.dragMove !== angular.noop && a.sortableScope.$apply(function() {
115674115673
a.callbacks.dragMove(v, y, s);
115675-
}), l = s.pageX - r[0].documentElement.scrollLeft, c = s.pageY - (i.pageYOffset || r[0].documentElement.scrollTop), m = angular.element(r[0].elementFromPoint(l, c)), p.addClass(t.hiddenClass), p.removeClass(t.hiddenClass), n.movePosition(s, p, v, y, w, _), p.addClass(t.dragging), !(f = h(m)) || !f.type) return;
115674+
}), l = s.pageX - r[0].documentElement.scrollLeft, c = s.pageY - (i.pageYOffset || r[0].documentElement.scrollTop), p.addClass(t.hiddenClass), m = angular.element(r[0].elementFromPoint(l, c)), p.removeClass(t.hiddenClass), n.movePosition(s, p, v, y, w, _), p.addClass(t.dragging), !(f = h(m)) || !f.type) return;
115676115675
if ("handle" === f.type && (f = f.itemScope), "item" !== f.type && "sortable" !== f.type) return;
115677115676
if ("item" === f.type && f.accept(a, f.sortableScope, f)) {
115678115677
m = f.element;

dist/styles/main.css

+4-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)