Merge branch '3.8'

Conflicts:
	.travis.yml
	templates/web/setup/wrapper.html.twig
	tests/Alchemy/Tests/Phrasea/Authentication/AuthenticatorTest.php
This commit is contained in:
Romain Neutron
2013-11-05 15:20:35 +01:00
19 changed files with 113 additions and 41 deletions

View File

@@ -9,12 +9,14 @@
* file that was distributed with this source code.
*/
use Symfony\Component\HttpKernel\Debug\ErrorHandler;
use Alchemy\Phrasea\Application;
use Symfony\Component\Debug\ErrorHandler;
require_once __DIR__ . '/../lib/autoload.php';
ErrorHandler::register();
$environment = Application::ENV_PROD;
$app = require __DIR__ . '/../lib/Alchemy/Phrasea/Application/Api.php';
$app->run();

View File

@@ -9,13 +9,14 @@
* file that was distributed with this source code.
*/
use Symfony\Component\HttpKernel\Debug\ErrorHandler;
use Alchemy\Phrasea\Application;
use Symfony\Component\Debug\ErrorHandler;
require_once __DIR__ . "/../lib/autoload.php";
ErrorHandler::register();
$environment = 'prod';
$environment = Application::ENV_PROD;
$app = require __DIR__ . '/../lib/Alchemy/Phrasea/Application/Root.php';
$app->run();

View File

@@ -9,13 +9,14 @@
* file that was distributed with this source code.
*/
use Symfony\Component\HttpKernel\Debug\ErrorHandler;
use Alchemy\Phrasea\Application;
use Symfony\Component\Debug\ErrorHandler;
require_once __DIR__ . "/../lib/autoload.php";
ErrorHandler::register();
$environment = 'dev';
$environment = Application::ENV_DEV;
$app = require __DIR__ . '/../lib/Alchemy/Phrasea/Application/Root.php';
$app->run();

View File

@@ -89,11 +89,22 @@ define([
"blur input#tbranch": "fieldChangedAction",
"blur input#separator": "fieldChangedAction",
"blur input#tag": "tagFieldChangedAction",
"change select#vocabulary-type": "triggerControlledVocabulary",
"keyup input.input-label": "labelChangedAction",
"change input[type=checkbox]": "fieldChangedAction",
"change select": "selectionChangedAction",
"click .lng-label a": "_toggleLabels"
},
triggerControlledVocabulary: function(e) {
if ($(e.target, this.$el).find("option:selected").val() === "") {
this.model.set("vocabulary-type", false);
this.render();
} else if ($("input#vocabulary-restricted", this.$el).length === 0) {
this.model.set("vocabulary-restricted", false);
this.model.set("vocabulary-type", $(e.target, this.$el).find("option:selected").val());
this.render();
}
},
selectionChangedAction: function(e) {
var field = $(e.target);
var data = {};

View File

@@ -225,6 +225,15 @@ define([
assert.isTrue(view.$('input#tag').closest(".control-group").hasClass("error"));
});
it("should uncheck vocabulary restricted if provided vocabulary is empty", function() {
var view = this.view.render();
view.$('input#vocabulary-restricted').attr("checked", true);
view.$('input#vocabulary-type option').first().attr("selected", true);
assert.isTrue(false === view.$('input#vocabulary-restricted').is(":checked"));
});
});
describe("FieldError Views", function() {

View File

@@ -1035,7 +1035,7 @@ function cleanTags(string)
}, {
'f':">",
't':">"
}, ];
} ];
for(c in chars2replace)
string = string.replace(RegExp(chars2replace[c].f,"g") ,chars2replace[c].t);
return string;
@@ -1929,6 +1929,10 @@ function startThisEditing(sbas_id,what,regbasprid,ssel)
});
}
hsplit1();
vsplit2()
vsplit1();
$('#EDIT_TOP', p4.edit.editBox).resizable({
handles : 's',
minHeight:100,
@@ -1958,7 +1962,7 @@ function startThisEditing(sbas_id,what,regbasprid,ssel)
});
$('#EDIT_MID_R')
.css('left', $('#EDIT_MID_R').position().left)
.css('left', $('#EDIT_MID_L').position().left + $('#EDIT_MID_L').width() + 15)
.resizable({
handles : 'w',
minWidth:200,
@@ -2114,10 +2118,6 @@ $('#EDIT_MID_R')
ETHSeeker = new EditThesaurusSeeker(p4.edit.sbas_id);
hsplit1();
vsplit2();
vsplit1();
setSizeLimits();
var p = {