Coding standards

This commit is contained in:
Romain Neutron
2012-03-09 12:49:13 +01:00
parent 20a771ae37
commit 82d9eeef7b
64 changed files with 217 additions and 175 deletions

View File

@@ -315,8 +315,8 @@ return call_user_func(function()
return $app['response']($result);
}
);
$route = '/records/{databox_id}/{record_id}/caption/';
$app->get(
$route, function($databox_id, $record_id) use ($app)

View File

@@ -293,7 +293,7 @@ return call_user_func(
$basket_collection = $repository->findActiveValidationAndBasketByUser(
$app['Core']->getAuthenticatedUser()
);
$basket = $repository->findUserBasket(
$ssel_id
, $app['Core']->getAuthenticatedUser()

View File

@@ -271,7 +271,7 @@ return call_user_func(function()
*/
$route = "/applications/dev/new";
$app->get($route, function() use ($app)
{
{
$var = array("violations" => null, 'form' => null, 'request' => $app['request']);
return $app['response']('api/auth/application_dev_new.twig', $var);

View File

@@ -67,8 +67,10 @@ return call_user_func(function()
$app->get('/', function() use ($app)
{
if ($app['install'] === true)
return $app->redirect('/setup/installer/');
if ($app['upgrade'] === true)
return $app->redirect('/setup/upgrader/');
});

View File

@@ -57,4 +57,4 @@ class ApcCache extends DoctrineApc implements Cache
return apc_clear_cache() && apc_clear_cache('user');
}
}
}

View File

@@ -40,6 +40,7 @@ class ArrayCache extends DoctrineArray implements Cache
{
throw new Exception(sprintf('Unable to find key %s', $id));
}
return $this->fetch($id);
}
@@ -60,4 +61,4 @@ class ArrayCache extends DoctrineArray implements Cache
return true;
}
}
}

View File

@@ -32,4 +32,4 @@ interface Cache extends DoctrineCache
public function deleteMulti(array $array_keys);
}
}

View File

@@ -88,7 +88,7 @@ class Manager
if ($this->hasChange($cacheKey, $service_name))
{
$driver->flush();
if ($write)
{
$this->registry[$cacheKey] = $service_name;

View File

@@ -57,4 +57,4 @@ class MemcacheCache extends DoctrineMemcache implements Cache
return $this->getMemcache()->flush();
}
}
}

View File

@@ -57,4 +57,4 @@ class XcacheCache extends DoctrineXcache implements Cache
return xcache_clear_cache(XC_TYPE_VAR, 0);
}
}
}

View File

@@ -412,22 +412,22 @@ class Basket implements ControllerProviderInterface
$em->persist($basket_element);
$basket->addBasketElement($basket_element);
if(null !== $validationSession = $basket->getValidation())
{
if(false !== $validationSession->isFinished())
{
continue;
}
$participants = $validationSession->getParticipants();
foreach($participants as $participant)
{
$validationData = new \Entities\ValidationData();
$validationData->setParticipant($participant);
$validationData->setBasketElement($basket_element);
$em->persist($validationData);
}
}

View File

@@ -763,7 +763,7 @@ class Push implements ControllerProviderInterface
{
$query->havePositions($request->get('Position'));
}
$sort = $request->get('srt', 'usr_creationdate');
$ord = $request->get('ord', 'desc');

View File

@@ -44,7 +44,7 @@ class Root implements ControllerProviderInterface
$registry = $app['Core']->getRegistry();
$user = $app['Core']->getAuthenticatedUser();
$cssPath = $registry->get('GV_RootPath') . 'www/skins/prod/';
$css = array();
$cssfile = false;
@@ -79,7 +79,7 @@ class Root implements ControllerProviderInterface
$thjslist = "";
$queries_topics = '';
if ($registry->get('GV_client_render_topics') == 'popups')
{
$queries_topics = \queries::dropdown_topics();
@@ -90,7 +90,7 @@ class Root implements ControllerProviderInterface
}
$sbas = $bas2sbas = array();
foreach ($appbox->get_databoxes() as $databox)
{
$sbas_id = $databox->get_sbas_id();

View File

@@ -110,7 +110,7 @@ class Story implements ControllerProviderInterface
, 'meta_id' => null
, 'value' => $value
);
break;
}
@@ -334,7 +334,7 @@ class Story implements ControllerProviderInterface
}
catch (\Exception $e)
{
}
$Serializer = $app['Core']['Serializer'];

View File

@@ -279,7 +279,7 @@ class Core extends \Pimple
{
return \User_Adapter::getInstance($session->get_usr_id(), $appbox);
}
return null;
}

View File

@@ -49,6 +49,7 @@ class Configuration
{
$specifications = new Configuration\ApplicationSpecification();
}
return new self($specifications, $environment);
}

View File

@@ -134,12 +134,14 @@ class ApplicationSpecification implements Specification
$this->getConfigurationsFile();
$this->getConnexionsFile();
$this->getServicesFile();
return true;
}
catch (\Exception $e)
{
}
return false;
}

View File

@@ -19,4 +19,4 @@ namespace Alchemy\Phrasea\Core\Service\Exception;
class ServiceNotFound extends \Exception
{
}
}

View File

@@ -36,7 +36,7 @@ class FirePHP extends ServiceAbstract implements ServiceInterface
$this->logger = new Logger('FirePHP');
$this->logger->pushHandler(new FirePHPHandler());
return $this;
}
@@ -60,4 +60,4 @@ class FirePHP extends ServiceAbstract implements ServiceInterface
return array();
}
}
}

View File

@@ -35,10 +35,10 @@ class Prod extends Helper
$user = $this->getCore()->getAuthenticatedUser();
if(!$user instanceof \User_Adapter)
{
{
return $search_datas;
}
$searchSet = $user->getPrefs('search');
foreach ($user->ACL()->get_granted_sbas() as $databox)

View File

@@ -121,7 +121,7 @@ class UserProvider implements ControlProviderInterface
public function getRessource($id)
{
$Core = \bootstrap::getCore();
return \User_Adapter::getInstance($id, \appbox::get_instance($Core));
}

View File

@@ -56,6 +56,7 @@ class StoryWZRepository extends EntityRepository
{
return 0;
}
return ($a < $b) ? -1 : 1;
});

View File

@@ -53,12 +53,12 @@ class API_OAuth2_Form_DevAppDesktop
/**
*
* @var string
* @var string
*/
public $type;
public $scheme_website;
public $urlwebsite;
/**
*
* @param Request $request
@@ -116,7 +116,7 @@ class API_OAuth2_Form_DevAppDesktop
/**
*
* @return string
* @return string
*/
public function getType()
{
@@ -132,7 +132,7 @@ class API_OAuth2_Form_DevAppDesktop
{
return $this->urlwebsite;
}
public function getSchemeCallback()
{
return '';
@@ -152,7 +152,8 @@ class API_OAuth2_Form_DevAppDesktop
$metadata->addPropertyConstraint('description', new Constraints\NotBlank($blank));
$metadata->addPropertyConstraint('urlwebsite', new Constraints\NotBlank($blank));
$metadata->addPropertyConstraint('urlwebsite', new Constraints\Url($url));
return;
}
}
}

View File

@@ -50,10 +50,10 @@ class API_OAuth2_Form_DevAppInternet
* @var string
*/
public $callback;
public $scheme_website;
public $scheme_callback;
public $urlwebsite;
public $urlcallback;
@@ -71,10 +71,10 @@ class API_OAuth2_Form_DevAppInternet
$this->scheme_website = $request->get('scheme-website', 'http://');
$this->scheme_callback = $request->get('scheme-callback', 'http://');
$this->type = API_OAuth2_Application::WEB_TYPE;
$this->urlwebsite = $this->scheme_website.$this->website;
$this->urlcallback = $this->scheme_callback.$this->callback;
return $this;
}
@@ -116,7 +116,7 @@ class API_OAuth2_Form_DevAppInternet
/**
*
* @return string
* @return string
*/
public function getType()
{
@@ -159,6 +159,7 @@ class API_OAuth2_Form_DevAppInternet
$metadata->addPropertyConstraint('urlwebsite', new Constraints\Url($url));
$metadata->addPropertyConstraint('urlcallback', new Constraints\NotBlank($blank));
$metadata->addPropertyConstraint('urlcallback', new Constraints\Url($url));
return;
}

View File

@@ -207,7 +207,7 @@ class API_V1_adapter extends API_V1_Abstract
public function caption_records(Request $request, $databox_id, $record_id)
{
$result = new API_V1_result($request, $this);
$record = $this->appbox->get_databox($databox_id)->get_record($record_id);
$fields = $record->get_caption()->get_fields();
$ret = array();
@@ -220,9 +220,10 @@ class API_V1_adapter extends API_V1_Abstract
);
}
$result->set_datas($ret);
return $result;
}
/**
* Get an API_V1_result containing the results of a records search
*

View File

@@ -130,17 +130,17 @@ class Bridge_Api_Dailymotion_Container implements Bridge_Api_ContainerInterface
{
return $this->url;
}
public function get_duration()
{
return '';
}
public function get_category()
{
return '';
}
public function is_private()
{
return null;

View File

@@ -377,6 +377,7 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf
if (!$response->isOk())
{
if ($response->err_code === 3) //Already exists in photoset
return;
throw new Bridge_Exception_ApiConnectorRequestFailed();
}
@@ -663,12 +664,15 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf
{
if (!$this->registry->get('GV_flickr_api'))
return false;
if (trim($this->registry->get('GV_flickr_client_id')) === '')
return false;
if (trim($this->registry->get('GV_flickr_client_secret')) === '')
return false;
return true;

View File

@@ -138,17 +138,17 @@ class Bridge_Api_Flickr_Container implements Bridge_Api_ContainerInterface
return $this->type;
}
public function get_duration()
{
return '';
}
public function get_category()
{
return '';
}
public function is_private()
{
return null;

View File

@@ -121,14 +121,14 @@ class Bridge_Api_Youtube_Container implements Bridge_Api_ContainerInterface
{
return '';
}
public function get_category()
{
return '';
}
public function is_private()
{
return null;

View File

@@ -136,10 +136,12 @@ class appbox extends base
$custom_path.= $collection->get_base_id();
if (is_null($pathfile))
return $this;
$datas = file_get_contents($pathfile->getPathname());
if (is_null($datas))
return $this;
file_put_contents($file, $datas);
@@ -191,10 +193,12 @@ class appbox extends base
$custom_path.= $pic_type . '_' . $databox->get_sbas_id();
if (is_null($pathfile))
return $this;
$datas = file_get_contents($pathfile->getPathname());
if (is_null($datas))
return $this;
file_put_contents($file, $datas);
@@ -540,6 +544,7 @@ class appbox extends base
public function get_databoxes()
{
if ($this->databoxes)
return $this->databoxes;
$ret = array();

View File

@@ -79,6 +79,7 @@ abstract class base implements cache_cacheableInterface
public function get_schema()
{
if ($this->schema)
return $this->schema;
$this->load_schema();
@@ -167,6 +168,7 @@ abstract class base implements cache_cacheableInterface
{
$this->cache = $this->Core->getCache();
}
return $this->cache;
}
@@ -232,6 +234,7 @@ abstract class base implements cache_cacheableInterface
{
if ($this->version)
return $this->version;
$version = '0.0.0';
@@ -260,8 +263,10 @@ abstract class base implements cache_cacheableInterface
public function upgradeavailable()
{
if ($this->get_version())
return version_compare(\Alchemy\Phrasea\Core\Version::getNumber(), $this->get_version(), '>');
else
return true;
}
@@ -399,6 +404,7 @@ abstract class base implements cache_cacheableInterface
protected function load_schema()
{
if ($this->schema)
return $this;
$structure = simplexml_load_file(__DIR__ . "/../../lib/conf.d/bases_structure.xml");

View File

@@ -59,6 +59,7 @@ class cache_databox
if ($date <= $last_update)
{
self::$refreshing = false;
return;
}

View File

@@ -79,6 +79,7 @@ class gatekeeper
$session = $appbox->get_session();
if (http_request::is_command_line())
return;
if (isset($_SERVER['PHP_SELF']) && trim($_SERVER['PHP_SELF']))
@@ -131,6 +132,7 @@ class gatekeeper
if ($this->_PHP_SELF == '/thesaurus2/xmlhttp/getterm.x.php'
|| $this->_PHP_SELF == '/thesaurus2/xmlhttp/searchcandidate.x.php'
|| $this->_PHP_SELF == '/thesaurus2/xmlhttp/getsy.x.php')
return;
phrasea::redirect('/login/?redirect=/thesaurus2');
break;
@@ -139,6 +141,7 @@ class gatekeeper
break;
case 'admin':
if ($this->_script_name === 'runscheduler.php')
return;
phrasea::redirect('/login/?redirect=' . $_SERVER['REQUEST_URI']);
break;
@@ -158,6 +161,7 @@ class gatekeeper
return;
case 'setup':
if ($appbox->upgradeavailable())
return;
else
phrasea::redirect('/login/');
@@ -274,6 +278,7 @@ class gatekeeper
$parm = $request->get_parms('LOG');
if (is_null($parm["LOG"]))
return $this;
try

View File

@@ -306,6 +306,7 @@ class module_console_fileEnsureDevSetting extends Command
$output->writeln(sprintf('<error>Miss required keys %s</error>', implode(', ', $required)));
$this->errors++;
}
return;
}
@@ -447,6 +448,7 @@ class module_console_fileEnsureDevSetting extends Command
{
$config = new \Doctrine\DBAL\Configuration();
$conn = \Doctrine\DBAL\DriverManager::getConnection($connexion->all(), $config);
return true;
}
catch (\Exception $e)

View File

@@ -300,6 +300,7 @@ class module_console_fileEnsureProductionSetting extends Command
$output->writeln(sprintf('<error>Miss required keys %s</error>', implode(', ', $required)));
$this->errors++;
}
return;
}
@@ -441,6 +442,7 @@ class module_console_fileEnsureProductionSetting extends Command
{
$config = new \Doctrine\DBAL\Configuration();
$conn = \Doctrine\DBAL\DriverManager::getConnection($connexion->all(), $config);
return true;
}
catch (\Exception $e)
@@ -896,6 +898,7 @@ class module_console_fileEnsureProductionSetting extends Command
{
return false;
}
return $server === $Service->getDriver()->isServer();
}

View File

@@ -645,7 +645,7 @@ class module_report_activity extends module_report
{
unset($this->result[$i]);
}
if (isset($this->result[$i]['poiddoc']) && isset($this->result[$i]['poidprev']))
{
$this->result[$i]['poiddoc'] = p4string::format_octets($this->result[$i]['poiddoc']);
@@ -653,7 +653,7 @@ class module_report_activity extends module_report
}
}
$i++;
$this->result[$i]['nbprev'] = 0;
@@ -692,7 +692,7 @@ class module_report_activity extends module_report
$save_user = $user;
}
unset($this->result[$i]);
$nb_row = $i + 1;
$this->total = $nb_row;
@@ -772,7 +772,7 @@ class module_report_activity extends module_report
}
catch (Exception $e)
{
}
}
elseif ($value == "size")

View File

@@ -64,9 +64,9 @@ class patch_3602 implements patchInterface
}
catch(\PDOException $e)
{
}
return true;
}

View File

@@ -222,13 +222,13 @@ class set_order extends set_abstract
$core = \bootstrap::getCore();
$em = $core->getEntityManager();
$Basket = null;
/* @var $repository \Repositories\BasketRepository */
if($this->ssel_id)
{
$repository = $em->getRepository('\Entities\Basket');
try
{
$Basket = $repository->findUserBasket($this->ssel_id, $core->getAuthenticatedUser(), false);
@@ -284,8 +284,8 @@ class set_order extends set_abstract
$Basket->addBasketElement($BasketElement);
$em->persist($BasketElement);
$params = array(
':usr_id' => $session->get_usr_id()
, ':order_id' => $this->id

View File

@@ -607,15 +607,15 @@ class setup
if ($Core->getCache()->isServer())
{
$stats = $Core->getCache()->getStats();
echo '<li>' . sprintf(_('setup::Serveur actif sur %s'), $registry->get('GV_cache_server_host') . ':' . $registry->get('GV_cache_server_port')) . '</li>';
echo "<table>";
foreach ($stats as $name => $stat)
{
echo "<tr class='even'><td>" . $name . "</td><td> " . $stat . "</td></tr>";
}
echo "</table>";
}
else
@@ -806,7 +806,7 @@ class setup
$appConf = new \Alchemy\Phrasea\Core\Configuration\ApplicationSpecification();
$appConf->delete();
return;
}

View File

@@ -99,6 +99,7 @@ class sphinxrt
$cl = new SphinxClient();
if ($cl->Status() === false)
return $this;
$cl->SetServer($registry->get('GV_sphinx_host'), (int) $registry->get('GV_sphinx_port'));

View File

@@ -35,6 +35,7 @@ $extractDateFields = function(\Alchemy\Phrasea\Core $Core) {
$date_sort_fields[$date['fieldname']] = $date['fieldname'];
}
}
return $date_sort_fields;
};

View File

@@ -31,7 +31,7 @@
<directory>../lib/unitTest/</directory>
</testsuite>
</testsuites>
<filter>
<blacklist>
<directory>./vendor</directory>

View File

@@ -401,7 +401,7 @@ class ApiYamlApplication extends PhraseanetWebTestCaseAbstract
$this->evaluateBadRequestRoute($route, array('GET'));
$this->evaluateMethodNotAllowedRoute($route, array('POST', 'PUT', 'DELETE'));
}
public function testRecordsMetadatasRoute()
{
foreach (static::$databoxe_ids as $databox_id)
@@ -1243,7 +1243,7 @@ class ApiYamlApplication extends PhraseanetWebTestCaseAbstract
$this->assertTrue(is_string($meta["value"]));
}
}
protected function evaluateRecordsMetadataResponse($content)
{
$this->assertArrayHasKey("metadatas", $content["response"]);

View File

@@ -312,7 +312,7 @@ class ApplicationLightboxTest extends PhraseanetWebTestCaseAuthenticatedAbstract
$datas = json_decode($this->client->getResponse()->getContent());
$this->assertTrue(is_object($datas), 'asserting good json datas');
$this->assertTrue($datas->error);
$validationBasket = $this->insertOneValidationBasket();
$crawler = $this->client->request('POST', '/ajax/SET_RELEASE/' . $validationBasket->getId() . '/');

View File

@@ -461,45 +461,45 @@ class ControllerBasketTest extends PhraseanetWebTestCaseAuthenticatedAbstract
$this->assertEquals(2, $basket->getElements()->count());
}
public function testAddElementToValidationPost()
{
$em = self::$core->getEntityManager();
$datas = $em->getRepository('Entities\ValidationData')->findAll();
$countDatas = count($datas);
$validationSession = new \Entities\ValidationSession();
$validationSession->setDescription('Une description au hasard');
$validationSession->setName('Un nom de validation');
$expires = new \DateTime();
$expires->modify('+1 week');
$validationSession->setExpires($expires);
$validationSession->setInitiator(self::$user);
$basket = new \Entities\Basket();
$basket->setName('test');
$basket->setDescription('description');
$basket->setOwner(self::$user);
$basket->setValidation($validationSession);
$validationSession->setBasket($basket);
$validationParticipant = new \Entities\ValidationParticipant();
$validationParticipant->setSession($validationSession);
$validationParticipant->setUser(self::$user_alt1);
$validationSession->addValidationParticipant($validationParticipant);
$em->persist($validationParticipant);
$em->persist($basket);
$em->persist($validationSession);
$em->flush();
$route = sprintf('/baskets/%s/addElements/', $basket->getId());
$records = array(
self::$record_1->get_serialize_key(),
self::$record_2->get_serialize_key(),
@@ -522,13 +522,13 @@ class ControllerBasketTest extends PhraseanetWebTestCaseAuthenticatedAbstract
$basket = $em->getRepository('Entities\Basket')->find($basket->getId());
$this->assertEquals(2, $basket->getElements()->count());
$datas = $em->getRepository('Entities\ValidationData')->findAll();
$this->assertTrue($countDatas < count($datas), 'assert that '.count($datas).' > '.$countDatas );
}
public function testAddElementPostJSON()
{
$basket = $this->insertOneBasket();

View File

@@ -271,7 +271,7 @@ class BridgeApplication extends PhraseanetWebTestCaseAuthenticatedAbstract
}
catch (Exception $e)
{
}
try
@@ -281,7 +281,7 @@ class BridgeApplication extends PhraseanetWebTestCaseAuthenticatedAbstract
}
catch (Exception $e)
{
}
}

View File

@@ -73,7 +73,7 @@
{% if app_type == "web" %}
<tr class="callback" style="height:25px;">
<td><label for="callback">{% trans 'URL de callback' %} <br/></label></td>
<td class="url-td">
<td class="url-td">
<select name="scheme-callback">
<option value="http://">http://</option>
<option value="https://">https://</option>

View File

@@ -27,10 +27,10 @@
<td>{% trans 'URL de callback' %}</td>
{% if app.get_type == constant('API_OAuth2_Application::DESKTOP_TYPE') %}
<td>
<span>{{app.get_redirect_uri}}</span>
<span>{{app.get_redirect_uri}}</span>
</td>
{% else %}
<td class="url_callback"><span class="url_callback_input">{{app.get_redirect_uri}}</span>
<td class="url_callback"><span class="url_callback_input">{{app.get_redirect_uri}}</span>
<button type="button" class="save_callback" style="display:none;">save</button>
<button type="button" class="modifier_callback" style="display:none;">modifier</button>
</td>

View File

@@ -1,36 +1,36 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<html>
<head>
<meta charset="utf-8" />
<title>Phraseanet Authentication</title>
<title>Phraseanet Authentication</title>
<meta name="author" content="Alchemy" />
<!-- Mobile viewport optimized -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- styles -->
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css" href="/skins/oauth/default.css" />
<!-- styles -->
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css" href="/skins/oauth/default.css" />
<!-- All JavaScript at the bottom, except this Modernizr build.
Modernizr enables HTML5 elements & feature detects for optimal performance. -->
<script type="text/javascript" src="/skins/html5/Boilerplate/js/modernizr-2.5.2.min.js"></script>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div id="page" class="container">
<body>
<div id="page" class="container">
<div id="main" class="row">
<div id="title-box" class="span6 offset3">
<h1 id="namePhr">{{home_title}}</h1>
</div>
{% if not session.is_authenticated %}
<div id="content-box" class="span6 offset3">
<form id="login-form" class="form-vertical" method="post">
@@ -53,7 +53,7 @@
<a href="#">{% trans 'Probl&egrave;mes de connexion ?' %}</a>
</p>
</div>
{% else %}
{% else %}
{% if user is not none %}
{% set username = '<b>' ~ user.get_display_name() ~ '</b>' %}
<div id="hello-box" class="span6 offset3">
@@ -62,7 +62,7 @@
Hello {{username}}
{% endtrans %}
</p>
</div>
</div>
{% endif %}
{% if auth.getClient() is not none %}
<div id="text-box" class="span6 offset3">
@@ -95,8 +95,8 @@
<input id="button_deny" class="btn btn-inverse btn-large span3" type="submit" value="{% trans 'Ne pas autoriser' %}" />
</form>
</div>
{% endif %}
{% endif %}
</div>
</div>
@@ -115,5 +115,5 @@
<script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-transition.js"></script>
<script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-typeahead.js"></script>
</body>
</html>
</body>
</html>

View File

@@ -1,8 +1,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<html>
<head>
<meta charset="utf-8" />
<title>
<title>
{% if error is defined %}
{% trans 'Fail' %}
{% else %}
@@ -14,20 +14,20 @@
<!-- Mobile viewport optimized -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- styles -->
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css" href="/skins/oauth/default.css" />
<!-- styles -->
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css" href="/skins/oauth/default.css" />
<!-- All JavaScript at the bottom, except this Modernizr build.
Modernizr enables HTML5 elements & feature detects for optimal performance. -->
<script type="text/javascript" src="/skins/html5/Boilerplate/js/modernizr-2.5.2.min.js"></script>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div id="page" class="container">
@@ -59,7 +59,7 @@
{% endtrans %}
</p>
<input type="text" class="input-large" name="access_token" value="{{token.access_token}}" size="{{token.access_token|length}}"/>
</div>
</div>
{% else %}
<div id="top-text-box">
<h4>{% trans %}Code d'acc&egrave;s{% endtrans %}</h4>
@@ -94,5 +94,5 @@
<script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-transition.js"></script>
<script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-typeahead.js"></script>
</body>
</html>
</body>
</html>

View File

@@ -73,7 +73,7 @@
{% if app_type == "web" %}
<tr class="callback" style="height:25px;">
<td><label for="callback">{% trans 'URL de callback' %} <br/></label></td>
<td class="url-td">
<td class="url-td">
<select name="scheme-callback">
<option value="http://">http://</option>
<option value="https://">https://</option>

View File

@@ -27,10 +27,10 @@
<td>{% trans 'URL de callback' %}</td>
{% if app.get_type == constant('API_OAuth2_Application::DESKTOP_TYPE') %}
<td>
<span>{{app.get_redirect_uri}}</span>
<span>{{app.get_redirect_uri}}</span>
</td>
{% else %}
<td class="url_callback"><span class="url_callback_input">{{app.get_redirect_uri}}</span>
<td class="url_callback"><span class="url_callback_input">{{app.get_redirect_uri}}</span>
<button type="button" class="save_callback" style="display:none;">save</button>
<button type="button" class="modifier_callback" style="display:none;">modifier</button>
</td>

View File

@@ -1,36 +1,36 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<html>
<head>
<meta charset="utf-8" />
<title>Phraseanet Authentication</title>
<title>Phraseanet Authentication</title>
<meta name="author" content="Alchemy" />
<!-- Mobile viewport optimized -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- styles -->
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css" href="/skins/oauth/default.css" />
<!-- styles -->
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css" href="/skins/oauth/default.css" />
<!-- All JavaScript at the bottom, except this Modernizr build.
Modernizr enables HTML5 elements & feature detects for optimal performance. -->
<script type="text/javascript" src="/skins/html5/Boilerplate/js/modernizr-2.5.2.min.js"></script>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div id="page" class="container">
<body>
<div id="page" class="container">
<div id="main" class="row">
<div id="title-box" class="span6 offset3">
<h1 id="namePhr">{{home_title}}</h1>
</div>
{% if not session.is_authenticated %}
<div id="content-box" class="span6 offset3">
<form id="login-form" class="form-vertical" method="post">
@@ -53,7 +53,7 @@
<a href="#">{% trans 'Probl&egrave;mes de connexion ?' %}</a>
</p>
</div>
{% else %}
{% else %}
{% if user is not none %}
{% set username = '<b>' ~ user.get_display_name() ~ '</b>' %}
<div id="hello-box" class="span6 offset3">
@@ -62,7 +62,7 @@
Hello {{username}}
{% endtrans %}
</p>
</div>
</div>
{% endif %}
{% if auth.getClient() is not none %}
<div id="text-box" class="span6 offset3">
@@ -95,8 +95,8 @@
<input id="button_deny" class="btn btn-inverse btn-large span3" type="submit" value="{% trans 'Ne pas autoriser' %}" />
</form>
</div>
{% endif %}
{% endif %}
</div>
</div>
@@ -115,5 +115,5 @@
<script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-transition.js"></script>
<script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-typeahead.js"></script>
</body>
</html>
</body>
</html>

View File

@@ -1,8 +1,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<html>
<head>
<meta charset="utf-8" />
<title>
<title>
{% if error is defined %}
{% trans 'Fail' %}
{% else %}
@@ -14,20 +14,20 @@
<!-- Mobile viewport optimized -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- styles -->
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css" href="/skins/oauth/default.css" />
<!-- styles -->
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css" href="/skins/oauth/default.css" />
<!-- All JavaScript at the bottom, except this Modernizr build.
Modernizr enables HTML5 elements & feature detects for optimal performance. -->
<script type="text/javascript" src="/skins/html5/Boilerplate/js/modernizr-2.5.2.min.js"></script>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div id="page" class="container">
@@ -59,7 +59,7 @@
{% endtrans %}
</p>
<input type="text" class="input-xlarge" name="access_token" value="{{token.access_token}}" size="{{token.access_token|length}}"/>
</div>
</div>
{% else %}
<div id="top-text-box">
<h4>{% trans %}Code d'acc&egrave;s{% endtrans %}</h4>
@@ -94,5 +94,5 @@
<script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-transition.js"></script>
<script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-typeahead.js"></script>
</body>
</html>
</body>
</html>

View File

@@ -492,7 +492,7 @@
count += parseInt($(count_el).val());
}
});
{% set max_download = registry.get('GV_download_max', 120) %}
{% set alert_too_big%}
"{% trans %} You can not directly download more than {{max_download}} Mo ; time to package all documents is too long{% endtrans %}\n"+

View File

@@ -53,6 +53,7 @@
{
var val = $.trim($('#auto_order').val());
if(val == '')
return;
var sorter = {};

View File

@@ -53,6 +53,7 @@
{
var val = $.trim($('#auto_order').val());
if(val == '')
return;
var sorter = {};

View File

@@ -62,9 +62,9 @@
</div>
<script type="text/javascript">
$(document).ready(function(){
$("#QuickAddUser button").button();
$("#QuickAddUser form").bind('submit', function(){

View File

@@ -32,7 +32,7 @@
<img src="/skins/icons/push16.png"/>
</button>
{% endif %}
{% if user.ACL().has_right('push') %}
<button class="ui-corner-all TOOL_feedback_btn basket_window" title="{% trans 'Feedback' %}">
<img src="/skins/icons/feedback16.png"/>

View File

@@ -88,7 +88,7 @@
return false;
});
$('.deleter', $container).bind('click', function(){
var owner = $(this).closest('.owner');
var usr_id = owner.find('input[name="usr_id"]').val();
@@ -133,7 +133,7 @@
}
});
}
function unShareWith(usr_id, callback)
{
@@ -155,6 +155,7 @@
humane.error(data.message);
}
$dialog.refresh();
return;
},
error: function(){

View File

@@ -93,7 +93,7 @@
<div class="PNB" style="top:40px;height:120px;bottom:auto;">
<table style="table-layout:fixed;width:100%;">
<tr>
<td>
<td>
<label>{% trans 'Activite' %}</label>
</td>
<td>
@@ -102,10 +102,10 @@
<td >
<label>{% trans 'Company' %}</label>
</td>
<td >
<td >
<label>{% trans 'Country' %}</label>
</td>
<td >
<td >
<label>{% trans 'Position' %}</label>
</td>
</tr>
@@ -135,7 +135,7 @@
</select>
</td>
<td>
<select size="5" multiple="multiple" name="Country[]" style="width:80%;">
<option value="">{% trans 'All' %}</option>
{% for Code, Country in query.getRelatedCountries() %}
@@ -144,7 +144,7 @@
</select>
</td>
<td >
<select size="5" multiple="multiple" name="Position[]" style="width:80%;">
<option value="">{% trans 'All' %}</option>
{% for Position in query.getRelatedPositions() %}

View File

@@ -20,7 +20,7 @@
$(".horizontal-scroller:visible").css("position", "fixed");
}
});*/
</script>
{% if is_infouser %}

View File

@@ -292,6 +292,7 @@ phrasea::headers();
},
success: function(data){
alert(data.message);
return;
}
});

View File

@@ -226,15 +226,15 @@ if (!is_null($templates) || !is_null($parm['deny']) || !is_null($parm['accept'])
bodySize.y = $(window).height();
bodySize.x = $(window).width();
var $heightd = $('#tab_demandes').outerHeight(true);
var maxSize = (bodySize.y - 120);
if($heightd > maxSize)
{
$('#tab_demandes').height(maxSize);
}
}
$(document).ready(function(){