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
3e7cf812
Commit
3e7cf812
erstellt
6 years ago
von
Henning Leutz
Dateien durchsuchen
Optionen
Downloads
Einfaches Diff
Merge branch 'dev'
Übergeordnete
204e678a
0ae192fc
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
1 Merge Request
!63
Update 'next-2.x' with latest changes from 'main'
Änderungen
1
Leerzeichenänderungen ausblenden
Inline
Nebeneinander
1 geänderte Datei
qui/controls/buttons/Select.js
+50
-26
50 Ergänzungen, 26 Löschungen
qui/controls/buttons/Select.js
wird angezeigt
mit
50 Ergänzungen
und
26 Löschungen
qui/controls/buttons/Select.js
+
50
−
26
Zeige Datei @
3e7cf812
...
...
@@ -39,6 +39,8 @@ define('qui/controls/buttons/Select', [
'
set
'
,
'
$set
'
,
'
$onDestroy
'
,
'
$onInject
'
,
'
$onChange
'
,
'
$onBlur
'
,
'
$onKeyUp
'
,
'
$disableScroll
'
,
...
...
@@ -63,7 +65,8 @@ define('qui/controls/buttons/Select', [
placeholderIcon
:
false
,
placeholderSelectable
:
true
,
// placeholder is standard selectable menu child
multiple
:
false
,
checkable
:
false
checkable
:
false
,
localeStorage
:
false
// name for the locale storage, if this is set, the value is stored in the locale storage
},
params
:
{},
...
...
@@ -105,13 +108,15 @@ define('qui/controls/buttons/Select', [
this
.
$placeholderIcon
=
this
.
getAttribute
(
'
placeholderIcon
'
);
this
.
addEvent
(
'
onDestroy
'
,
this
.
$onDestroy
);
this
.
addEvent
(
'
onInject
'
,
this
.
$onInject
);
this
.
addEvent
(
'
onChange
'
,
this
.
$onChange
);
},
/**
* Create the DOMNode Element
*
* @method qui/controls/buttons/Select#create
* @return {HTMLElement}
* @return {HTMLElement
|Element
}
*/
create
:
function
()
{
var
self
=
this
;
...
...
@@ -215,14 +220,14 @@ define('qui/controls/buttons/Select', [
this
.
$Select
.
addEvents
({
change
:
function
()
{
if
(
self
.
getAttribute
(
'
multiple
'
))
{
var
selected
=
self
.
$Select
.
getElements
(
'
option:selected
'
)
.
map
(
function
(
Option
)
{
return
Option
.
value
;
});
var
selected
=
self
.
$Select
.
getElements
(
'
option:selected
'
).
map
(
function
(
Option
)
{
return
Option
.
value
;
});
self
.
setValues
(
selected
);
return
;
}
self
.
setValue
(
this
.
value
);
},
focus
:
function
()
{
...
...
@@ -336,6 +341,41 @@ define('qui/controls/buttons/Select', [
return
this
.
$Elm
;
},
/**
* event: on inject
*/
$onInject
:
function
()
{
if
(
!
this
.
getAttribute
(
'
localeStorage
'
))
{
return
;
}
var
localeStorageName
=
this
.
getAttribute
(
'
localeStorage
'
);
var
localeData
=
QUI
.
Storage
.
get
(
localeStorageName
);
try
{
this
.
setValue
(
JSON
.
decode
(
localeData
)
);
}
catch
(
e
)
{
}
},
/**
* event: on change
*
* @param value
*/
$onChange
:
function
(
value
)
{
if
(
!
this
.
getAttribute
(
'
localeStorage
'
))
{
return
;
}
QUI
.
Storage
.
set
(
this
.
getAttribute
(
'
localeStorage
'
),
JSON
.
encode
(
value
)
);
},
/**
* Set the value and select the option
*
...
...
@@ -500,6 +540,7 @@ define('qui/controls/buttons/Select', [
* @param {String} text - Text of the child
* @param {String} value - Value of the child
* @param {String} [icon] - optional
*
* @return {Object} this (qui/controls/buttons/Select)
*/
appendChild
:
function
(
text
,
value
,
icon
)
{
...
...
@@ -648,12 +689,7 @@ define('qui/controls/buttons/Select', [
}
// ie11 focus fix
if
(
Active
===
this
.
$Menu
.
getElm
()
||
Active
===
this
.
$Menu
.
$Container
)
{
return
true
;
}
return
false
;
return
Active
===
this
.
$Menu
.
getElm
()
||
Active
===
this
.
$Menu
.
$Container
;
},
/**
...
...
@@ -1043,24 +1079,12 @@ define('qui/controls/buttons/Select', [
/**
* Show the search
*/
$showSearch
:
function
(
event
)
{
$showSearch
:
function
()
{
if
(
this
.
$Search
)
{
return
;
}
var
self
=
this
,
children
=
this
.
$Menu
.
getChildren
(),
value
=
event
.
key
;
value
=
value
.
toString
().
replace
(
/ /g
,
''
).
toLowerCase
();
var
found
=
children
.
filter
(
function
(
Child
)
{
return
Child
.
getAttribute
(
'
text
'
).
toString
().
toLowerCase
().
substr
(
0
,
1
)
===
value
;
});
// if (!found.length) {
// return;
// }
var
self
=
this
;
this
.
$Search
=
new
Element
(
'
input
'
,
{
'
class
'
:
'
qui-select-search
'
,
...
...
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