Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
QUIQQER
QUIQQER
Commits
98ef4b11
Commit
98ef4b11
authored
Nov 18, 2020
by
Henning Leutz
🥋
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 1.5
parents
02c1360c
759e8d6a
Changes
158
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
1143 additions
and
677 deletions
+1143
-677
.gitignore
.gitignore
+2
-1
CHANGELOG
CHANGELOG
+9
-1
admin/ajax/desktop/workspace/load.php
admin/ajax/desktop/workspace/load.php
+1
-3
admin/ajax/licenseKey/activate.php
admin/ajax/licenseKey/activate.php
+22
-0
admin/ajax/licenseKey/checkStatus.php
admin/ajax/licenseKey/checkStatus.php
+23
-0
admin/ajax/licenseKey/get.php
admin/ajax/licenseKey/get.php
+14
-7
admin/ajax/licenseKey/upload.php
admin/ajax/licenseKey/upload.php
+2
-63
admin/ajax/packages/hasLicense.php
admin/ajax/packages/hasLicense.php
+18
-0
admin/ajax/project/create.php
admin/ajax/project/create.php
+10
-14
admin/ajax/settings/window.php
admin/ajax/settings/window.php
+13
-6
admin/ajax/site/children/sort.php
admin/ajax/site/children/sort.php
+3
-1
admin/ajax/users/address/save.php
admin/ajax/users/address/save.php
+5
-0
admin/index.php
admin/index.php
+4
-1
admin/login.php
admin/login.php
+4
-5
bin/16x16/flags/aa.png
bin/16x16/flags/aa.png
+0
-0
bin/16x16/flags/ab.png
bin/16x16/flags/ab.png
+0
-0
bin/QUI/classes/packages/Manager.js
bin/QUI/classes/packages/Manager.js
+16
-0
bin/QUI/classes/projects/Manager.js
bin/QUI/classes/projects/Manager.js
+30
-0
bin/QUI/classes/projects/Project.js
bin/QUI/classes/projects/Project.js
+17
-8
bin/QUI/classes/projects/project/Media.js
bin/QUI/classes/projects/project/Media.js
+20
-0
bin/QUI/classes/request/Bundler.js
bin/QUI/classes/request/Bundler.js
+27
-0
bin/QUI/controls/cache/LongTime.js
bin/QUI/controls/cache/LongTime.js
+2
-2
bin/QUI/controls/desktop/panels/XML.js
bin/QUI/controls/desktop/panels/XML.js
+4
-2
bin/QUI/controls/grid/Grid.css
bin/QUI/controls/grid/Grid.css
+5
-16
bin/QUI/controls/grid/Grid.js
bin/QUI/controls/grid/Grid.js
+126
-86
bin/QUI/controls/grid/omnigrid/export.php
bin/QUI/controls/grid/omnigrid/export.php
+0
-322
bin/QUI/controls/licenseKey/LicenseKey.css
bin/QUI/controls/licenseKey/LicenseKey.css
+22
-0
bin/QUI/controls/licenseKey/LicenseKey.html
bin/QUI/controls/licenseKey/LicenseKey.html
+36
-0
bin/QUI/controls/licenseKey/LicenseKey.js
bin/QUI/controls/licenseKey/LicenseKey.js
+174
-22
bin/QUI/controls/licenseKey/LicenseKeyPanel.js
bin/QUI/controls/licenseKey/LicenseKeyPanel.js
+0
-5
bin/QUI/controls/menu/Manager.js
bin/QUI/controls/menu/Manager.js
+5
-2
bin/QUI/controls/packages/SystemCheck.css
bin/QUI/controls/packages/SystemCheck.css
+4
-4
bin/QUI/controls/projects/project/Panel.js
bin/QUI/controls/projects/project/Panel.js
+54
-22
bin/QUI/controls/projects/project/Settings.js
bin/QUI/controls/projects/project/Settings.js
+6
-7
bin/QUI/controls/projects/project/media/Entry.css
bin/QUI/controls/projects/project/media/Entry.css
+49
-0
bin/QUI/controls/projects/project/media/Entry.js
bin/QUI/controls/projects/project/media/Entry.js
+156
-0
bin/QUI/controls/projects/project/media/Select.css
bin/QUI/controls/projects/project/media/Select.css
+76
-0
bin/QUI/controls/projects/project/media/Select.js
bin/QUI/controls/projects/project/media/Select.js
+137
-0
bin/QUI/controls/upload/Form.js
bin/QUI/controls/upload/Form.js
+2
-0
bin/QUI/controls/users/Address.js
bin/QUI/controls/users/Address.js
+2
-1
bin/QUI/controls/users/search/Search.js
bin/QUI/controls/users/search/Search.js
+13
-7
bin/QUI/controls/usersAndGroups/Select.js
bin/QUI/controls/usersAndGroups/Select.js
+1
-1
bin/mail_protection.php
bin/mail_protection.php
+1
-2
composer.json
composer.json
+6
-2
index.php
index.php
+1
-0
lib/QUI.php
lib/QUI.php
+1
-15
lib/QUI/Ajax.php
lib/QUI/Ajax.php
+8
-1
lib/QUI/CRUD/Child.php
lib/QUI/CRUD/Child.php
+0
-2
lib/QUI/CRUD/Factory.php
lib/QUI/CRUD/Factory.php
+0
-2
lib/QUI/Cache/Exception.php
lib/QUI/Cache/Exception.php
+0
-1
lib/QUI/Cache/LongTermCache.php
lib/QUI/Cache/LongTermCache.php
+0
-2
lib/QUI/Cache/QuiqqerFileDriver.php
lib/QUI/Cache/QuiqqerFileDriver.php
+0
-2
lib/QUI/Cache/QuiqqerMongoDriver.php
lib/QUI/Cache/QuiqqerMongoDriver.php
+0
-2
lib/QUI/Cache/QuiqqerRedisDriver.php
lib/QUI/Cache/QuiqqerRedisDriver.php
+0
-2
lib/QUI/Controls/LangSwitch.php
lib/QUI/Controls/LangSwitch.php
+0
-1
lib/QUI/Controls/Navigation.php
lib/QUI/Controls/Navigation.php
+0
-1
lib/QUI/Editor/Manager.php
lib/QUI/Editor/Manager.php
+0
-1
lib/QUI/Groups/Exception.php
lib/QUI/Groups/Exception.php
+0
-1
lib/QUI/Groups/Group.php
lib/QUI/Groups/Group.php
+0
-1
lib/QUI/Groups/Manager.php
lib/QUI/Groups/Manager.php
+0
-1
lib/QUI/Groups/Utils.php
lib/QUI/Groups/Utils.php
+0
-1
lib/QUI/Icons/Handler.php
lib/QUI/Icons/Handler.php
+0
-2
lib/QUI/Interfaces/Projects/Media/File.php
lib/QUI/Interfaces/Projects/Media/File.php
+0
-1
lib/QUI/Interfaces/Projects/Trash.php
lib/QUI/Interfaces/Projects/Trash.php
+0
-2
lib/QUI/Interfaces/System/Patch.php
lib/QUI/Interfaces/System/Patch.php
+0
-2
lib/QUI/Interfaces/System/Test.php
lib/QUI/Interfaces/System/Test.php
+0
-1
lib/QUI/Interfaces/Template/EngineInterface.php
lib/QUI/Interfaces/Template/EngineInterface.php
+0
-1
lib/QUI/Interfaces/Users/User.php
lib/QUI/Interfaces/Users/User.php
+0
-1
lib/QUI/Locale.php
lib/QUI/Locale.php
+0
-1
lib/QUI/Lock/Exception.php
lib/QUI/Lock/Exception.php
+0
-2
lib/QUI/Lock/Locker.php
lib/QUI/Lock/Locker.php
+0
-2
lib/QUI/Mail/Log.php
lib/QUI/Mail/Log.php
+0
-2
lib/QUI/Output.php
lib/QUI/Output.php
+12
-8
lib/QUI/Package/Composer/CommandEvents.php
lib/QUI/Package/Composer/CommandEvents.php
+0
-2
lib/QUI/Package/Composer/PackageEvents.php
lib/QUI/Package/Composer/PackageEvents.php
+0
-1
No files found.
.gitignore
View file @
98ef4b11
...
...
@@ -3,4 +3,5 @@ etc/
media/
var/
.htaccess
!ajax/media/
\ No newline at end of file
!ajax/media/
!bin/QUI/controls/projects/project/media
CHANGELOG
View file @
98ef4b11
1.5.0 ()
1.5.1 ()
Fix
- Sort Error fixed; Sorting consider inactive Sites
- quiqqer/quiqqer#1033 No Vhosts and only one language -> Links with language flag
- quiqqer/quiqqer#728 removed robloach/component-installer
1.5.0 (11.09.2020)
Features
...
...
admin/ajax/desktop/workspace/load.php
View file @
98ef4b11
...
...
@@ -6,9 +6,7 @@
QUI
::
$Ajax
->
registerFunction
(
'ajax_desktop_workspace_load'
,
function
()
{
$list
=
QUI\Workspace\Manager
::
getWorkspacesByUser
(
QUI
::
getUserBySession
()
);
$list
=
QUI\Workspace\Manager
::
getWorkspacesByUser
(
QUI
::
getUserBySession
());
if
(
!
QUI
::
conf
(
'mail'
,
'admin_mail'
)
||
QUI
::
conf
(
'mail'
,
'admin_mail'
)
===
''
)
{
QUI
::
getMessagesHandler
()
->
addError
(
...
...
admin/ajax/licenseKey/activate.php
0 → 100644
View file @
98ef4b11
<?php
use
QUI\System\License
;
/**
* Activate this QUIQQER system for the currently registered license
*
* @return array - Request response
*/
QUI
::
$Ajax
->
registerFunction
(
'ajax_licenseKey_activate'
,
function
()
{
try
{
return
License
::
activateSystem
();
}
catch
(
\
Exception
$Exception
)
{
QUI\System\Log
::
writeException
(
$Exception
);
throw
$Exception
;
}
},
[],
'Permission::checkAdminUser'
);
admin/ajax/licenseKey/checkStatus.php
0 → 100644
View file @
98ef4b11
<?php
use
QUI\System\License
;
/**
* Check license status
*
* @return array
* @throws QUI\Exception
*/
QUI
::
$Ajax
->
registerFunction
(
'ajax_licenseKey_checkStatus'
,
function
()
{
try
{
return
License
::
getStatus
();
}
catch
(
\
Exception
$Exception
)
{
QUI\System\Log
::
writeException
(
$Exception
);
throw
$Exception
;
}
},
[],
'Permission::checkAdminUser'
);
admin/ajax/licenseKey/get.php
View file @
98ef4b11
<?php
use
QUI\Security\Encryption
;
use
QUI\Utils\System\File
;
use
QUI\System\License
;
use
QUI\Config
;
/**
...
...
@@ -13,11 +12,16 @@ QUI::$Ajax->registerFunction(
'ajax_licenseKey_get'
,
function
()
{
$licenseConfigFile
=
CMS_DIR
.
'etc/license.ini.php'
;
$default
=
[
'id'
=>
'-'
,
'created'
=>
'-'
,
'validUntil'
=>
'-'
,
'name'
=>
'-'
,
$systemId
=
License
::
getSystemId
();
$systemDataHash
=
License
::
getSystemDataHash
();
$default
=
[
'systemId'
=>
$systemId
,
'systemDataHash'
=>
$systemDataHash
,
'id'
=>
'-'
,
'created'
=>
'-'
,
'validUntil'
=>
'-'
,
'name'
=>
'-'
,
];
if
(
!
\
file_exists
(
$licenseConfigFile
))
{
...
...
@@ -41,6 +45,9 @@ QUI::$Ajax->registerFunction(
unset
(
$data
[
'keyHash'
]);
$data
[
'systemId'
]
=
$systemId
;
$data
[
'systemDataHash'
]
=
$systemDataHash
;
return
$data
;
},
[],
...
...
admin/ajax/licenseKey/upload.php
View file @
98ef4b11
<?php
use
QUI\Security\Encryption
;
use
QUI\Utils\System\File
;
use
QUI\Config
;
use
QUI\System\License
;
/**
* Upload a license key file
...
...
@@ -15,67 +13,8 @@ QUI::$Ajax->registerFunction(
'ajax_licenseKey_upload'
,
function
(
$File
)
{
try
{
$content
=
\
file_get_contents
(
$File
->
getAttribute
(
'filepath'
));
$content
=
\
json_decode
(
hex2bin
(
$content
),
true
);
if
(
\
json_last_error
()
!==
JSON_ERROR_NONE
)
{
throw
new
QUI\Exception
(
'JSON Error in license data: '
.
\
json_last_error_msg
());
}
$keys
=
[
'id'
,
'created'
,
'licenseHash'
,
'licenseServer'
,
'validUntil'
,
'name'
];
foreach
(
$keys
as
$key
)
{
if
(
!
isset
(
$content
[
$key
]))
{
throw
new
QUI\Exception
(
'Missing key "'
.
$key
.
'" in license data.'
);
}
if
(
empty
(
$content
[
$key
]))
{
throw
new
QUI\Exception
(
'Empty key "'
.
$key
.
'" in license data.'
);
}
if
(
!
is_string
(
$content
[
$key
]))
{
throw
new
QUI\Exception
(
'Non-string key "'
.
$key
.
'" in license data.'
);
}
}
// put license data in config
$licenseConfigFile
=
CMS_DIR
.
'etc/license.ini.php'
;
File
::
mkfile
(
$licenseConfigFile
);
if
(
!
\
file_exists
(
$licenseConfigFile
))
{
throw
new
QUI\Exception
(
'Could not create license config file "'
.
$licenseConfigFile
.
'"'
);
}
$LicenseConfig
=
new
Config
(
$licenseConfigFile
);
$LicenseConfig
->
set
(
'license'
,
'id'
,
$content
[
'id'
]);
$LicenseConfig
->
set
(
'license'
,
'created'
,
$content
[
'created'
]);
$LicenseConfig
->
set
(
'license'
,
'name'
,
$content
[
'name'
]);
$LicenseConfig
->
set
(
'license'
,
'validUntil'
,
$content
[
'validUntil'
]);
$LicenseConfig
->
set
(
'license'
,
'licenseHash'
,
\
bin2hex
(
Encryption
::
encrypt
(
\
hex2bin
(
$content
[
'licenseHash'
])))
);
$LicenseConfig
->
save
(
$licenseConfigFile
);
// set license server
$Config
=
new
QUI\Config
(
ETC_DIR
.
'conf.ini.php'
);
$Config
->
set
(
'license'
,
'url'
,
$content
[
'licenseServer'
]);
$Config
->
save
();
// re-create composer.json
QUI
::
getPackageManager
()
->
refreshServerList
();
License
::
registerLicenseFile
(
$File
);
}
catch
(
\
Exception
$Exception
)
{
QUI\System\Log
::
addError
(
'AJAX :: ajax_licenseKey_upload'
);
QUI\System\Log
::
writeException
(
$Exception
);
QUI
::
getMessagesHandler
()
->
addError
(
...
...
admin/ajax/packages/hasLicense.php
0 → 100644
View file @
98ef4b11
<?php
use
QUI\Config
;
/**
* Checks if this QUIQQER system has the license to use $package
*
* @param string $package
* @return bool
*/
QUI
::
$Ajax
->
registerFunction
(
'ajax_packages_hasLicense'
,
function
(
$licensePackage
)
{
return
QUI
::
getPackageManager
()
->
hasLicense
(
\
QUI\Utils\Security\Orthos
::
clear
(
$licensePackage
));
},
[
'licensePackage'
],
'Permission::checkAdminUser'
);
admin/ajax/project/create.php
View file @
98ef4b11
...
...
@@ -10,27 +10,23 @@
QUI
::
$Ajax
->
registerFunction
(
'ajax_project_create'
,
function
(
$params
)
{
$params
=
\
json_decode
(
$params
,
true
);
$Project
=
QUI\Projects\Manager
::
createProject
(
$params
[
'project'
],
$params
[
'lang'
]
);
$params
=
\
json_decode
(
$params
,
true
);
$template
=
''
;
// @todo check if template is allowed
if
(
isset
(
$params
[
'template'
])
&&
!
empty
(
$params
[
'template'
]))
{
$Config
=
QUI
::
getProjectManager
()
->
getConfig
();
$installedTemplates
=
QUI
::
getPackageManager
()
->
searchInstalledPackages
([
'type'
=>
'quiqqer-template'
]);
$template
=
$params
[
'template'
];
$template
=
QUI\Utils\Security\Orthos
::
removeHTML
(
$template
);
$template
=
QUI\Utils\Security\Orthos
::
clearPath
(
$template
);
$Config
->
set
(
$Project
->
getName
(),
'template'
,
$template
);
$Config
->
save
();
}
$Project
=
QUI\Projects\Manager
::
createProject
(
$params
[
'project'
],
$params
[
'lang'
],
[],
$template
);
if
(
isset
(
$params
[
'demodata'
])
&&
$params
[
'demodata'
]
&&
isset
(
$template
))
{
QUI\Utils\Project
::
applyDemoDataToProject
(
$Project
,
$template
);
}
...
...
admin/ajax/settings/window.php
View file @
98ef4b11
...
...
@@ -8,7 +8,11 @@
*/
QUI
::
$Ajax
->
registerFunction
(
'ajax_settings_window'
,
function
(
$file
)
{
function
(
$file
,
$windowName
)
{
if
(
!
isset
(
$windowName
)
||
\
strpos
(
$windowName
,
'.xml'
)
!==
false
)
{
$windowName
=
false
;
}
if
(
\
file_exists
(
$file
))
{
$files
=
[
$file
];
}
else
{
...
...
@@ -18,13 +22,16 @@ QUI::$Ajax->registerFunction(
$cacheName
=
'quiqqer/package/quiqqer/quiqqer/menu/windows/'
.
\
md5
(
\
json_encode
(
$files
));
$Settings
=
QUI\Utils\XML\Settings
::
getInstance
();
if
(
$windowName
)
{
$cacheName
.
=
\
md5
(
$windowName
);
}
try
{
$result
=
QUI\Cache\Manager
::
get
(
$cacheName
);
}
catch
(
QUI\Exception
$Exception
)
{
$windowName
=
false
;
if
(
\
is_array
(
$files
)
&&
\
in_array
(
'packages/quiqqer/quiqqer/admin/settings/cache.xml'
,
$files
))
{
if
(
!
$windowName
&&
\
is_array
(
$files
)
&&
\
in_array
(
'packages/quiqqer/quiqqer/admin/settings/cache.xml'
,
$files
))
{
$windowName
=
'quiqqer-cache'
;
}
...
...
@@ -73,6 +80,6 @@ QUI::$Ajax->registerFunction(
return
$result
;
},
[
'file'
],
[
'file'
,
'windowName'
],
'Permission::checkAdminUser'
);
admin/ajax/site/children/sort.php
View file @
98ef4b11
...
...
@@ -23,7 +23,9 @@ QUI::$Ajax->registerFunction(
$Parent
->
save
();
}
$childrenIds
=
$Parent
->
getChildrenIds
();
$childrenIds
=
$Parent
->
getChildrenIds
([
'active'
=>
'0&1'
]);
foreach
(
$ids
as
$id
)
{
$from
=
$from
+
1
;
...
...
admin/ajax/users/address/save.php
View file @
98ef4b11
...
...
@@ -69,6 +69,11 @@ QUI::$Ajax->registerFunction(
$Address
->
setAttributes
(
$data
);
$Address
->
save
();
if
(
isset
(
$data
[
'standard'
])
&&
$data
[
'standard'
]
===
1
)
{
$User
->
setAttribute
(
'address'
,
$Address
->
getId
());
$User
->
save
();
}
return
$Address
->
getId
();
},
[
'uid'
,
'aid'
,
'data'
],
...
...
admin/index.php
View file @
98ef4b11
...
...
@@ -151,6 +151,9 @@ if ($Avatar) {
var QUIQQER_HASH = "
<?php
echo
QUI
::
getPackageManager
()
->
getHash
();
?>
";
var QUIQQER_CONFIG =
<?php
echo
\
json_encode
(
$config
);
?>
;
// Exceptions
var QUIQQER_EXCEPTION_CODE_PACKAGE_NOT_LICENSED =
<?php
echo
QUI
::
getPackageManager
()
::
EXCEPTION_CODE_PACKAGE_NOT_LICENSED
;
?>
;
// standard project
var QUIQQER_PROJECT =
<?php
echo
\
json_encode
([
'name'
=>
$Project
?
$Project
->
getName
()
:
''
,
...
...
@@ -248,7 +251,7 @@ if ($Avatar) {
</div>
</noscript>
<script
src=
"
<?php
echo
URL_OPT_DIR
;
?>
bin/require.js"
></script>
<script
src=
"
<?php
echo
URL_OPT_DIR
;
?>
bin/
requirejs/
require.js"
></script>
<script
src=
"
<?php
echo
URL_OPT_DIR
;
?>
bin/qui/qui/lib/mootools-core.js"
></script>
<script
src=
"
<?php
echo
URL_OPT_DIR
;
?>
bin/qui/qui/lib/mootools-more.js"
></script>
<script
src=
"
<?php
echo
URL_OPT_DIR
;
?>
bin/qui/qui/lib/moofx.js"
></script>
...
...
admin/login.php
View file @
98ef4b11
...
...
@@ -328,7 +328,7 @@ foreach ($packages as $package) {
?>
<script
src=
"
<?php
echo
URL_OPT_DIR
;
?>
bin/r
equire
.js"
></script>
<script
src=
"
<?php
echo
URL_OPT_DIR
;
?>
bin/r.js"
></script>
<script
src=
"
<?php
echo
URL_OPT_DIR
;
?>
bin/qui/qui/lib/mootools-core.js"
></script>
<script
src=
"
<?php
echo
URL_OPT_DIR
;
?>
bin/qui/qui/lib/mootools-more.js"
></script>
<script
src=
"
<?php
echo
URL_OPT_DIR
;
?>
bin/qui/qui/lib/moofx.js"
></script>
...
...
@@ -376,13 +376,10 @@ foreach ($packages as $package) {
if
(
"
language
"
in
navigator
)
{
lang
=
navigator
.
language
;
}
else
if
(
"
browserLanguage
"
in
navigator
)
{
lang
=
navigator
.
browserLanguage
;
}
else
if
(
"
systemLanguage
"
in
navigator
)
{
lang
=
navigator
.
systemLanguage
;
}
else
if
(
"
userLanguage
"
in
navigator
)
{
lang
=
navigator
.
userLanguage
;
}
...
...
@@ -405,7 +402,9 @@ foreach ($packages as $package) {
'
locale/quiqqer/quiqqer/
'
+
lang
],
function
(
QUI
,
Session
,
QUILocale
)
{
QUILocale
.
setCurrent
(
lang
);
Session
.
set
(
'
quiqqer-user-language
'
,
lang
);
Session
.
set
(
'
quiqqer-user-language
'
,
lang
).
catch
(
function
(
err
)
{
// doesn't matter
});
var
LoginElement
=
document
.
getElement
(
'
.quiqqer-login
'
);
...
...
bin/16x16/flags/aa.png
0 → 100644
View file @
98ef4b11
233 Bytes
bin/16x16/flags/ab.png
0 → 100644
View file @
98ef4b11
233 Bytes
bin/QUI/classes/packages/Manager.js
View file @
98ef4b11
...
...
@@ -610,6 +610,22 @@ define('classes/packages/Manager', [
onError
:
reject
});
});
},
/**
* Checks if this QUIQQER system has a specific package license
*
* @param {String} pkg
* @returns {Promise}
*/
hasPackageLicense
:
function
(
pkg
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
Ajax
.
post
(
'
ajax_packages_hasLicense
'
,
resolve
,
{
'
package
'
:
pkg
,
licensePackage
:
pkg
,
onError
:
reject
});
});
}
});
});
bin/QUI/classes/projects/Manager.js
View file @
98ef4b11
...
...
@@ -55,6 +55,36 @@ define('classes/projects/Manager', [
}
},
/**
* constructor
*
* @param {Object} options
*/
initialize
:
function
(
options
)
{
this
.
parent
(
options
);
this
.
addEvents
({
onProjectSave
:
function
(
Project
)
{
this
.
$getList
=
null
;
var
name
=
Project
.
getName
(),
projects
=
{};
for
(
var
key
in
this
.
$projects
)
{
if
(
!
this
.
$projects
.
hasOwnProperty
(
key
))
{
continue
;
}
if
(
key
.
indexOf
(
name
+
'
-
'
)
!==
0
)
{
projects
[
key
]
=
this
.
$projects
[
key
];
}
}
this
.
$projects
=
projects
;
}.
bind
(
this
)
});
},
/**
* Return the wanted project
* If no name and lang given, the current project will be return
...
...
bin/QUI/classes/projects/Project.js
View file @
98ef4b11
...
...
@@ -163,16 +163,10 @@ define('classes/projects/Project', [
}
resolve
(
self
.
$config
);
require
([
'
Projects
'
],
function
(
Projects
)
{
Projects
.
fireEvent
(
'
projectSave
'
,
[
self
]);
});
},
{
project
:
this
.
getName
(),
onError
:
reject
});
}.
bind
(
this
));
},
...
...
@@ -183,14 +177,12 @@ define('classes/projects/Project', [
getDefaults
:
function
()
{
var
self
=
this
;
return
new
Promise
(
function
(
resolve
,
reject
)
{
Ajax
.
get
(
'
ajax_project_get_defaults
'
,
function
(
result
)
{
resolve
(
result
);
},
{
project
:
self
.
encode
(),
onError
:
reject
});
});
},
...
...
@@ -238,6 +230,10 @@ define('classes/projects/Project', [
resolve
(
result
);
self
.
fireEvent
(
'
save
'
);
require
([
'
Projects
'
],
function
(
Projects
)
{
Projects
.
fireEvent
(
'
projectSave
'
,
[
self
]);
});
},
{
project
:
self
.
getName
(),
params
:
JSON
.
encode
(
params
||
false
),
...
...
@@ -284,6 +280,19 @@ define('classes/projects/Project', [
return
this
.
getAttribute
(
'
lang
'
);
},
/**
* Return all languages
*
* @return {Array}
*/
getLanguages
:
function
()
{
if
(
!
this
.
getAttribute
(
'
langs
'
))
{
return
[
this
.
getLang
()];
}
return
this
.
getAttribute
(
'
langs
'
).
split
(
'
,
'
);
},
/**
* Return the project title
*
...
...
bin/QUI/classes/projects/project/Media.js
View file @
98ef4b11
...
...
@@ -463,6 +463,26 @@ define('classes/projects/project/Media', [
onError
:
reject
});
});
},
//region search
/**
* Search files into the media
*
* @return {Promise}
*/
search
:
function
(
search
,
params
)
{
var
self
=
this
;
return
new
Promise
(
function
(
resolve
,
reject
)
{
Ajax
.
get
(
'
ajax_media_search
'
,
resolve
,
{
project
:
self
.
getProject
().
getName
(),
search
:
search
,
params
:
JSON
.
encode
(
params
),
onError
:
reject
});
});
}
});
});
bin/QUI/classes/request/Bundler.js
View file @
98ef4b11
...
...
@@ -195,6 +195,15 @@ define('classes/request/Bundler', [
onCancel
:
function
()
{
this
.
fireEvent
(
'
requestCancel
'
,
[
this
]);
}.
bind
(
this
),
onFailure
:
function
(
xhr
)
{
if
(
xhr
.
responseText
!==
''
)
{
this
.
$parseResponse
(
xhr
.
responseText
,
Params
,
requestData
);
}
this
.
fireEvent
(
'
requestFailure
'
,
[
this
]);
this
.
fireEvent
(
'
requestCancel
'
,
[
this
]);
}.
bind
(
this
)
});
...
...
@@ -280,6 +289,8 @@ define('classes/request/Bundler', [
return
false
;
};
var
maintenance
=
false
;
for
(
k
in
result
)
{
if
(
!
result
.
hasOwnProperty
(
k
))
{
continue
;
...
...
@@ -290,6 +301,22 @@ define('classes/request/Bundler', [
entryResult
=
result
[
k
];
entryData
.
resolve
(
entryResult
);
if
(
typeof
entryResult
.
Exception
!==
'
undefined
'
&&
typeof
entryResult
.
Exception
.
code
!==
'
undefined
'
)
{
maintenance
=
true
;
}
}
if
(
maintenance
)
{
require
([
'
Locale
'
],
function
(
QUILocale
)
{
QUI
.
getMessageHandler
(
function
(
MH
)
{
MH
.
addInformation
(
QUILocale
.
get
(
'
quiqqer/quiqqer
'
,
'
message.maintenance
'
)
);
});
});
}
}
});
...
...
bin/QUI/controls/cache/LongTime.js
View file @
98ef4b11
...
...
@@ -64,7 +64,7 @@ define('controls/cache/LongTime', [
new
Element
(
'
button
'
,
{
type
:
'
buttons
'
,
class
:
'
qui-button
'
,
html
:
'
Kompletten Langzeitcache leere
n
'
,
html
:
QUILocale
.
get
(
lg
,
'
delete.long.term.cache.butto
n
'
)
,
styles
:
{
'
float
'
:
'
right
'
,