Skip to content

Commit

Permalink
Merge pull request #23 from albig/master
Browse files Browse the repository at this point in the history
Add Typeswitch for DFG-Viewer, Update OpenLayers
  • Loading branch information
Alexander Bigga committed Dec 18, 2014
2 parents 081b559 + a7fd1c7 commit 0e3c0f1
Show file tree
Hide file tree
Showing 294 changed files with 6,741 additions and 2,418 deletions.
3 changes: 2 additions & 1 deletion dlf/ext_autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
'tx_dlf_toc' => $extensionPath.'plugins/toc/class.tx_dlf_toc.php',
'tx_dlf_toolbox' => $extensionPath.'plugins/toolbox/class.tx_dlf_toolbox.php',
'tx_dlf_toolsPdf' => $extensionPath.'plugins/toolbox/tools/pdf/class.tx_dlf_toolsPdf.php',
'tx_dlf_validator' => $extensionPath.'plugins/validator/class.tx_dlf_validator.php'
'tx_dlf_validator' => $extensionPath.'plugins/validator/class.tx_dlf_validator.php',
'tx_dlf_doctype' => $extensionPath.'plugins/doctype/class.tx_dlf_doctype.php'
);

?>
2 changes: 1 addition & 1 deletion dlf/ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
'modify_tables' => '',
'clearCacheOnLoad' => FALSE,
'lockType' => '',
'version' => '1.2.2-dev',
'version' => '1.3.0',
'constraints' => array(
'depends' => array(
'php' => '5.3.0-',
Expand Down
51 changes: 51 additions & 0 deletions dlf/ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,55 @@

// Register AJAX eID handlers.
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = 'EXT:'.$_EXTKEY.'/plugins/search/class.tx_dlf_search_suggest.php';


if (TYPO3_MODE === 'FE') {

/*
* docType user function to use in typoscript:
*
* STORAGEID: uid of dlf storage folder
* DOCTYPE: document type string to test
*
* [userFunc = user_dlf_docTypeCheck(STORAGEID:DOCTYPE)]
*
* do something different
*
* [global]
*
**/
function user_dlf_docTypeCheck($cmd) {

// we have to split the cmd as we cannot have two parameters.
// this changed in TYPO3 6.2
$pidCondition = explode(':', $cmd);

$conf['pages'] = $pidCondition[0];

$docType = t3lib_div::makeInstance('tx_dlf_doctype');

switch($pidCondition[1]){
case "periodical":
if ($docType->main($cObj, $conf) === "periodical")
return TRUE;
break;
case "newspaper_global_anchor":
if ($docType->main($cObj, $conf) === "newspaper_global_anchor")
return TRUE;
break;
case "newspaper_year_anchor":
if ($docType->main($cObj, $conf) === "newspaper_year_anchor")
return TRUE;
break;
case "newspaper_issue":
if ($docType->main($cObj, $conf) === "newspaper_issue")
return TRUE;
break;
default : return FALSE;
}
// this function has to return FALSE or TRUE nothing else
return FALSE;
}

}
?>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Seb Benthall
Bruno Binet
Stéphane Brunner
Howard Butler
Bertil Chaupis
Bertil Chaupis
John Cole
Tim Coulter
Robert Coup
Expand All @@ -32,10 +32,10 @@ Peter William Robins
Gregers Rygg
Tim Schaub
Christopher Schmidt
Cameron Shorter
Cameron Shorter
Pedro Simonetti
Paul Spencer
Paul Smith
Paul Spencer
Paul Smith
Glen Stampoultzis
James Stembridge
Erik Uzureau
Expand All @@ -47,10 +47,10 @@ Steve Woodbridge
David Zwarg

Some portions of OpenLayers are used under the Apache 2.0 license, available
in licenses/APACHE-2.0.txt.
in doc/licenses/APACHE-2.0.txt.

Some portions of OpenLayers are used under the MIT license, available in
licenses/MIT-LICENSE.txt.
Some portions of OpenLayers are used under the MIT license, availabie in
doc/licenses/MIT-LICENSE.txt.

Some portions of OpenLayers are Copyright 2001 Robert Penner, and are used
under the BSD license, available in licenses/BSD-LICENSE.txt
under the BSD license, available in doc/licenses/BSD-LICENSE.txt
24 changes: 18 additions & 6 deletions dlf/lib/OpenLayers/lib/OpenLayers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
Expand Down Expand Up @@ -132,6 +132,7 @@
jsFiles = [
"OpenLayers/BaseTypes/Class.js",
"OpenLayers/Util.js",
"OpenLayers/Util/vendorPrefix.js",
"OpenLayers/Animation.js",
"OpenLayers/BaseTypes.js",
"OpenLayers/BaseTypes/Bounds.js",
Expand All @@ -143,10 +144,9 @@
"OpenLayers/Console.js",
"OpenLayers/Tween.js",
"OpenLayers/Kinetic.js",
"Rico/Corner.js",
"Rico/Color.js",
"OpenLayers/Events.js",
"OpenLayers/Events/buttonclick.js",
"OpenLayers/Events/featureclick.js",
"OpenLayers/Request.js",
"OpenLayers/Request/XMLHttpRequest.js",
"OpenLayers/Projection.js",
Expand Down Expand Up @@ -190,7 +190,6 @@
"OpenLayers/Layer/Zoomify.js",
"OpenLayers/Layer/ArcGISCache.js",
"OpenLayers/Popup/Anchored.js",
"OpenLayers/Popup/AnchoredBubble.js",
"OpenLayers/Popup/Framed.js",
"OpenLayers/Popup/FramedCloud.js",
"OpenLayers/Feature.js",
Expand Down Expand Up @@ -305,13 +304,18 @@
"OpenLayers/Format/GML/v2.js",
"OpenLayers/Format/GML/v3.js",
"OpenLayers/Format/Atom.js",
"OpenLayers/Format/EncodedPolyline.js",
"OpenLayers/Format/KML.js",
"OpenLayers/Format/GeoRSS.js",
"OpenLayers/Format/WFS.js",
"OpenLayers/Format/OWSCommon.js",
"OpenLayers/Format/OWSCommon/v1.js",
"OpenLayers/Format/OWSCommon/v1_0_0.js",
"OpenLayers/Format/OWSCommon/v1_1_0.js",
"OpenLayers/Format/WCSCapabilities.js",
"OpenLayers/Format/WCSCapabilities/v1.js",
"OpenLayers/Format/WCSCapabilities/v1_0_0.js",
"OpenLayers/Format/WCSCapabilities/v1_1_0.js",
"OpenLayers/Format/WFSCapabilities.js",
"OpenLayers/Format/WFSCapabilities/v1.js",
"OpenLayers/Format/WFSCapabilities/v1_0_0.js",
Expand Down Expand Up @@ -393,7 +397,10 @@
"OpenLayers/Symbolizer/Raster.js",
"OpenLayers/Lang.js",
"OpenLayers/Lang/en.js",
"OpenLayers/Spherical.js"
"OpenLayers/Spherical.js",
"OpenLayers/TileManager.js",
"OpenLayers/WPSClient.js",
"OpenLayers/WPSProcess.js"
]; // etc.
}

Expand All @@ -413,5 +420,10 @@

/**
* Constant: VERSION_NUMBER
*
* This constant identifies the version of OpenLayers.
*
* When asking questions or reporting issues, make sure to include the output of
* OpenLayers.VERSION_NUMBER in the question or issue-description.
*/
OpenLayers.VERSION_NUMBER="Release 2.12";
OpenLayers.VERSION_NUMBER="Release 2.13.1";
22 changes: 8 additions & 14 deletions dlf/lib/OpenLayers/lib/OpenLayers/Animation.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/**
* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license.
*
* full text of the license. */

/**
* @requires OpenLayers/SingleFile.js
* @requires OpenLayers/Util/vendorPrefix.js
*/

/**
Expand All @@ -19,11 +20,8 @@ OpenLayers.Animation = (function(window) {
* Property: isNative
* {Boolean} true if a native requestAnimationFrame function is available
*/
var isNative = !!(window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame);
var requestAnimationFrame = OpenLayers.Util.vendorPrefix.js(window, "requestAnimationFrame");
var isNative = !!(requestAnimationFrame);

/**
* Function: requestFrame
Expand All @@ -36,11 +34,7 @@ OpenLayers.Animation = (function(window) {
* element - {DOMElement} Optional element that visually bounds the animation.
*/
var requestFrame = (function() {
var request = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
var request = window[requestAnimationFrame] ||
function(callback, element) {
window.setTimeout(callback, 16);
};
Expand Down
35 changes: 30 additions & 5 deletions dlf/lib/OpenLayers/lib/OpenLayers/BaseTypes.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
Expand Down Expand Up @@ -127,7 +127,9 @@ OpenLayers.String = {
if (i == 0) {
replacement = context;
}

if (replacement === undefined) {
break;
}
replacement = replacement[subs[i]];
}

Expand Down Expand Up @@ -189,13 +191,18 @@ OpenLayers.String = {
*
* Parameters:
* value - {String}
* trimWhitespace - {Boolean}
*
* Returns:
* {Number|String} a Number if the passed value is a number, a String
* otherwise.
*/
numericIf: function(value) {
return OpenLayers.String.isNumeric(value) ? parseFloat(value) : value;
numericIf: function(value, trimWhitespace) {
var originalValue = value;
if (trimWhitespace === true && value != null && value.replace) {
value = value.replace(/^\s*|\s*$/g, "");
}
return OpenLayers.String.isNumeric(value) ? parseFloat(value) : originalValue;
}

};
Expand Down Expand Up @@ -290,7 +297,25 @@ OpenLayers.Number = {
str = integer + dsep + rem;
}
return str;
}
},

/**
* Method: zeroPad
* Create a zero padded string optionally with a radix for casting numbers.
*
* Parameters:
* num - {Number} The number to be zero padded.
* len - {Number} The length of the string to be returned.
* radix - {Number} An integer between 2 and 36 specifying the base to use
* for representing numeric values.
*/
zeroPad: function(num, len, radix) {
var str = num.toString(radix || 10);
while (str.length < len) {
str = "0" + str;
}
return str;
}
};

/**
Expand Down
Loading

0 comments on commit 0e3c0f1

Please sign in to comment.