Skip to content
GitLab
Erkunden
Anmelden
Registrieren
Primärnavigation
Suchen oder aufrufen …
Projekt
QUI
Verwalten
Aktivität
Mitglieder
Labels
Planen
Tickets
Ticketübersichten
Meilensteine
Wiki
Code
Merge Requests
Repository
Branch
Commits
Tags
Repository-Diagramm
Revisionen vergleichen
Code-Schnipsel
Build
Pipelines
Aufgaben
Pipeline-Zeitpläne
Artefakte
Bereitstellung
Releases
Modell-Registry
Betreiben
Umgebungen
Überwachen
Vorfälle
Service-Desk
Analysieren
Wertschöpfungskettenanalyse
Mitwirkenden-Analyse
CI/CD-Analyse
Repository-Analysen
Modellexperimente
Hilfe
Hilfe
Support
GitLab-Dokumentation
GitLab-Pläne vergleichen
Community-Forum
Zu GitLab beitragen
Feedback geben
Tastenkürzel
?
Code-Schnipsel
Gruppen
Projekte
Show more breadcrumbs
QUIQQER
QUI
Commits
fbc4bba9
Commit
fbc4bba9
erstellt
6 years ago
von
Henning Leutz
Dateien durchsuchen
Optionen
Downloads
Einfaches Diff
Merge branch 'dev'
Übergeordnete
de7f61f7
66c84e52
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
1 Merge Request
!63
Update 'next-2.x' with latest changes from 'main'
Änderungen
2
Leerzeichenänderungen ausblenden
Inline
Nebeneinander
2 geänderte Dateien
qui/controls/buttons/Select.js
+45
-31
45 Ergänzungen, 31 Löschungen
qui/controls/buttons/Select.js
qui/controls/elements/Select.js
+20
-11
20 Ergänzungen, 11 Löschungen
qui/controls/elements/Select.js
werden angezeigt
mit
65 Ergänzungen
und
42 Löschungen
qui/controls/buttons/Select.js
+
45
−
31
Zeige Datei @
fbc4bba9
...
...
@@ -249,10 +249,13 @@ define('qui/controls/buttons/Select', [
}
this
.
$Elm
.
addEvents
({
focus
:
this
.
open
,
focus
:
this
.
open
,
// click: this.open,
blur
:
this
.
$onBlur
,
keyup
:
this
.
$onKeyUp
blur
:
this
.
$onBlur
,
keyup
:
this
.
$onKeyUp
,
keydown
:
function
(
event
)
{
event
.
stop
();
}
});
this
.
$placeholderText
=
this
.
getAttribute
(
'
placeholderText
'
);
...
...
@@ -710,6 +713,10 @@ define('qui/controls/buttons/Select', [
);
}
if
(
y
+
MenuElm
.
getComputedSize
().
totalHeight
+
20
>
winSize
)
{
y
=
pos
.
y
-
10
-
MenuElm
.
getComputedSize
().
totalHeight
;
}
var
Option
=
this
.
$Menu
.
getChildren
(
this
.
getAttribute
(
'
name
'
)
+
this
.
getValue
()
);
...
...
@@ -966,19 +973,21 @@ define('qui/controls/buttons/Select', [
return
;
}
var
Elm
=
this
.
getElm
(),
MenuElm
=
this
.
$Menu
.
getElm
(),
pos
=
Elm
.
getPosition
(
document
.
body
),
size
=
Elm
.
getSize
();
var
x
=
pos
.
x
-
20
,
y
=
pos
.
y
+
size
.
y
;
this
.
$Menu
.
setAttribute
(
'
width
'
,
size
.
x
);
this
.
$Menu
.
show
();
MenuElm
.
setStyle
(
'
top
'
,
y
);
MenuElm
.
setStyle
(
'
left
'
,
x
);
event
.
stop
();
//
// var Elm = this.getElm(),
// MenuElm = this.$Menu.getElm(),
// pos = Elm.getPosition(document.body),
// size = Elm.getSize();
//
// var x = pos.x - 20,
// y = pos.y + size.y;
//
// this.$Menu.setAttribute('width', size.x);
// this.$Menu.show();
//
// MenuElm.setStyle('top', y);
// MenuElm.setStyle('left', x);
if
(
event
.
key
===
'
down
'
)
{
this
.
$Menu
.
down
();
...
...
@@ -1061,8 +1070,11 @@ define('qui/controls/buttons/Select', [
this
.
$Search
=
new
Element
(
'
input
'
,
{
'
class
'
:
'
qui-select-search
'
,
events
:
{
blur
:
this
.
$hideSearch
,
keyup
:
function
(
event
)
{
blur
:
this
.
$hideSearch
,
keydown
:
function
(
event
)
{
event
.
stop
();
},
keyup
:
function
(
event
)
{
event
.
stop
();
var
value
=
this
.
value
,
...
...
@@ -1088,19 +1100,19 @@ define('qui/controls/buttons/Select', [
return
;
}
var
Elm
=
self
.
getElm
(),
MenuElm
=
self
.
$Menu
.
getElm
(),
pos
=
Elm
.
getPosition
(
document
.
body
),
size
=
Elm
.
getSize
();
var
x
=
pos
.
x
,
y
=
pos
.
y
+
size
.
y
;
self
.
$Menu
.
setAttribute
(
'
width
'
,
size
.
x
);
self
.
$Menu
.
show
();
MenuElm
.
setStyle
(
'
top
'
,
y
);
MenuElm
.
setStyle
(
'
left
'
,
x
);
//
var Elm = self.getElm(),
//
MenuElm = self.$Menu.getElm(),
//
pos = Elm.getPosition(document.body),
//
size = Elm.getSize();
//
//
var x = pos.x,
//
y = pos.y + size.y;
//
//
self.$Menu.setAttribute('width', size.x);
//
self.$Menu.show();
//
//
MenuElm.setStyle('top', y);
//
MenuElm.setStyle('left', x);
if
(
event
.
key
===
'
down
'
)
{
...
...
@@ -1120,6 +1132,8 @@ define('qui/controls/buttons/Select', [
}
}).
inject
(
this
.
getElm
());
document
.
focus
();
this
.
$Search
.
focus
();
},
...
...
Dieser Diff ist reduziert.
Zum Erweitern klicken.
qui/controls/elements/Select.js
+
20
−
11
Zeige Datei @
fbc4bba9
...
...
@@ -50,19 +50,20 @@ define('qui/controls/elements/Select', [
],
options
:
{
max
:
false
,
// max entries
multiple
:
true
,
// select more than one entry?
searchbutton
:
true
,
name
:
''
,
// string
styles
:
{
max
:
false
,
// max entries
multiple
:
true
,
// select more than one entry?
searchbutton
:
true
,
name
:
''
,
// string
styles
:
{
height
:
120
},
label
:
false
,
// text string or a <label> DOMNode Element
icon
:
'
fa fa-angle-right
'
,
placeholder
:
'
Suche...
'
,
child
:
'
qui/controls/elements/SelectItem
'
,
// child type
showIds
:
true
,
// display the ids in the search result list or not
asyncSearch
:
true
// search the results asynchronically (if set to false -> just add items without search)
label
:
false
,
// text string or a <label> DOMNode Element
icon
:
'
fa fa-angle-right
'
,
placeholder
:
'
Suche...
'
,
child
:
'
qui/controls/elements/SelectItem
'
,
// child type
showIds
:
true
,
// display the ids in the search result list or not
asyncSearch
:
true
,
// search the results asynchronically (if set to false -> just add items without search)
allowDuplicates
:
true
// allow items with duplicate values
},
initialize
:
function
(
options
,
Input
)
{
...
...
@@ -258,6 +259,10 @@ define('qui/controls/elements/Select', [
* Refresh the display
*/
refresh
:
function
()
{
if
(
!
this
.
$Elm
)
{
return
;
}
if
(
!
this
.
getAttribute
(
'
max
'
)
||
parseInt
(
this
.
getAttribute
(
'
max
'
))
!==
1
)
{
this
.
$Elm
.
addClass
(
'
qui-elements-select-multiple
'
);
return
;
...
...
@@ -471,6 +476,10 @@ define('qui/controls/elements/Select', [
return
this
;
}
if
(
!
this
.
getAttribute
(
'
allowDuplicates
'
)
&&
this
.
$values
.
contains
(
id
))
{
return
this
;
}
if
(
this
.
getAttribute
(
'
max
'
)
===
1
&&
this
.
$values
.
length
)
{
this
.
$List
.
set
(
'
html
'
,
''
);
this
.
$values
=
[];
...
...
Dieser Diff ist reduziert.
Zum Erweitern klicken.
Vorschau
0%
Lade
Wiederholen
oder
Neue Datei anhängen
.
Abbrechen
You are about to add
0
people
to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Kommentar speichern
Abbrechen
Bitte
registrieren
oder
Anmelden
zum Kommentieren