Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6577b63eb2 | ||
|
|
55d63afa35 | ||
|
|
5dcb624965 | ||
|
|
22c33e6fdb | ||
|
|
966872e20b | ||
|
|
23fba90476 | ||
|
|
dcb5660cba | ||
|
|
ab7899b39b | ||
|
|
a2ceb0663d | ||
|
|
000f7acb37 | ||
|
|
5794651655 | ||
|
|
2b9927ddfe | ||
|
|
949e6fad97 | ||
|
|
428a2aa8d1 | ||
|
|
b3d662b80f | ||
|
|
2099892d54 | ||
|
|
22e0c2da64 | ||
|
|
7bc8676206 | ||
|
|
a8be2f2197 | ||
|
|
2f225b18c0 | ||
|
|
d316699ac4 | ||
|
|
d2394c4efb | ||
|
|
4c6bc1a740 | ||
|
|
1f0514af03 | ||
|
|
80c89d471e | ||
|
|
df11e6f960 | ||
|
|
8951e68ac1 | ||
|
|
4a5bb13603 | ||
|
|
4c2b6f5d53 | ||
|
|
bbea4e9028 | ||
|
|
c3db8d2e18 | ||
|
|
fdbcbc1462 | ||
|
|
9dead5737a | ||
|
|
5ebe3e1baa | ||
|
|
68df5aca2d | ||
|
|
ca243d0a99 | ||
|
|
3176b1896f | ||
|
|
b461dac96b | ||
|
|
82b58e4993 | ||
|
|
c70860efe6 | ||
|
|
6fa2f30d01 | ||
|
|
cae88caf50 | ||
|
|
3a60955701 | ||
|
|
3644c947f4 | ||
|
|
45a439d645 | ||
|
|
2f4251354a | ||
|
|
a0d757fdc6 | ||
|
|
38c740067c | ||
|
|
12f51f1171 | ||
|
|
573cb5321b | ||
|
|
d6437c6125 | ||
|
|
648e752623 | ||
|
|
3a4a57f304 | ||
|
|
d30c000edd | ||
|
|
076e166317 | ||
|
|
7e54135643 | ||
|
|
36f52857bf | ||
|
|
5630fcc467 | ||
|
|
f8ae0abd55 | ||
|
|
36c84e9dd3 | ||
|
|
337db5d2ab | ||
|
|
c45c8488f5 | ||
|
|
21d48fa58c | ||
|
|
c4548249be | ||
|
|
839550377d | ||
|
|
50d9c111a6 | ||
|
|
a155254c50 | ||
|
|
48913bf787 | ||
|
|
6ca79c3926 | ||
|
|
64a71496c0 | ||
|
|
521249f141 | ||
|
|
d649672e0b | ||
|
|
027bcc571a | ||
|
|
378bb0cf2f | ||
|
|
bafc8d08d0 | ||
|
|
bcef8334e7 | ||
|
|
aa4ade9579 | ||
|
|
42fccbdb0a | ||
|
|
10a01af0b0 | ||
|
|
92453878ef | ||
|
|
d251e630b1 | ||
|
|
9e67a22a1c | ||
|
|
a8a958ab85 | ||
|
|
6ba74f5206 | ||
|
|
732f6f732c | ||
|
|
6ed40fdab7 | ||
|
|
3afa2f2476 | ||
|
|
9e8901f862 | ||
|
|
da7880f637 | ||
|
|
b8ec0acd5e | ||
|
|
6521015df8 | ||
|
|
81d4007cfc | ||
|
|
d3c7b33ee8 | ||
|
|
b1d6805b9e | ||
|
|
29687312db | ||
|
|
f98fc08a7c | ||
|
|
f982d53676 | ||
|
|
34efe88273 | ||
|
|
d47729a527 | ||
|
|
3c47df00f9 | ||
|
|
76ee9ab7d1 |
@@ -0,0 +1,4 @@
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
.gitignore
|
||||
.git
|
||||
@@ -0,0 +1,3 @@
|
||||
[submodule "backend/php-s3/amazon-s3-php"]
|
||||
path = backend/php-s3/amazon-s3-php
|
||||
url = https://github.com/ericnorris/amazon-s3-php.git
|
||||
@@ -0,0 +1,53 @@
|
||||
#!/bin/bash
|
||||
/bin/echo "$0 - Building all containers [$(pwd)]"
|
||||
echo "USER: $UID"
|
||||
|
||||
# Parse owner/repo from GIT_URL
|
||||
: "${GIT_URL:?Missing GIT_URL in Jenkins env}"
|
||||
# GIT_URL="https://gitea.a.ucnit.eu/DMA-CSD-CICD/Test01.git"
|
||||
# Handle formats: https://gitea.example.com/owner/repo.git or git@gitea.example.com:owner/repo.git
|
||||
OWNER=""
|
||||
REPO=""
|
||||
GIT=""
|
||||
if echo "$GIT_URL" | grep -q "^http"; then
|
||||
GIT=$(echo "$GIT_URL" | cut -f 3 -d '/')
|
||||
OWNER=$(echo "$GIT_URL" | cut -f 4 -d '/')
|
||||
REPO=$(echo "$GIT_URL" | cut -f 5 -d '/' | xargs -- basename -s .git)
|
||||
fi
|
||||
if echo "$GIT_URL" | grep -q "^git@"; then
|
||||
GIT=$(echo "$GIT_URL" | cut -f 2 -d '@' | cut -f 1 -d ':')
|
||||
OWNER=$(echo "$GIT_URL" | cut -f 2 -d ':' | cut -f 1 -d '/')
|
||||
REPO=$(echo "$GIT_URL" | cut -f 2 -d '/' | xargs -- basename -s .git)
|
||||
fi
|
||||
|
||||
# if [[ "$GIT_URL" =~ [:\/]([^\/:]+)\/([^\/\.]+)(\.git)?$ ]]; then
|
||||
# OWNER="${BASH_REMATCH[1]}"
|
||||
# REPO="${BASH_REMATCH[2]}"
|
||||
# fi
|
||||
if [[ -z "$OWNER" || -z "$REPO" ]]; then
|
||||
echo "[ERROR] Could not determine owner/repo from GIT_URL=$GIT_URL"
|
||||
exit 1
|
||||
fi
|
||||
echo "Will publish package at [$REPO]/[$OWNER]"
|
||||
|
||||
echo "Will build:"
|
||||
/bin/find ./ -type f -name "*.csproj" | while read line; do
|
||||
solution=$(echo "$line" | cut -f 2 -d '/')
|
||||
project=$(echo "$line" | cut -f 3 -d '/')
|
||||
echo "[$solution]:[$project]"
|
||||
done
|
||||
|
||||
|
||||
/bin/find ./ -type f -name "*.csproj" | while read line; do
|
||||
solution=$(echo "$line" | cut -f 2 -d '/')
|
||||
project=$(echo "$line" | cut -f 3 -d '/')
|
||||
echo "Building [$solution] [$project]"
|
||||
.workflow/DotDockerbuilder10.sh --solution $solution --project $project --git $GIT --gituser $OWNER --accesstoken $GITEA_API_KEY
|
||||
done
|
||||
|
||||
if [ -f ./Dockerfile ]; then
|
||||
echo "Dockerfile detected at main level"
|
||||
docker buildx build --tag=$REPO:$(date +%y%m%d) .
|
||||
docker login $Git --username=$GitUser --password=$AccessToken
|
||||
docker push $REPO:$(date +%y%m%d)
|
||||
fi
|
||||
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "OK" > jenkins.result
|
||||
|
||||
# Check dotnet10 installed
|
||||
! which dotnet || sudo apt-get install -y dotnet10
|
||||
if ! which dotnet; then
|
||||
echo "DOTNET NOT FOUND"
|
||||
exit 1
|
||||
fi
|
||||
# Find all .csproj files and loop through them
|
||||
find . -type f -name "*.csproj" | while read -r csproj; do
|
||||
echo "Building $csproj..."
|
||||
|
||||
# Run dotnet build on the csproj file
|
||||
dotnet build "$csproj"
|
||||
|
||||
# If dotnet build fails (non-zero exit code), exit the script with an error code
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Build failed for $csproj. Exiting with error."
|
||||
echo "ERROR" > jenkins.result
|
||||
fi
|
||||
done
|
||||
|
||||
RESULT=$(cat jenkins.result)
|
||||
echo "RESULT=$RESULT"
|
||||
if [ "$RESULT" == "OK" ]; then
|
||||
echo "All builds succeeded."
|
||||
exit 0
|
||||
else
|
||||
echo "Errors were recorded"
|
||||
exit 1
|
||||
fi
|
||||
@@ -0,0 +1,207 @@
|
||||
#!/bin/bash
|
||||
|
||||
VERSION="2025.05.12-1430"
|
||||
|
||||
usage() {
|
||||
cat << EOF
|
||||
DotDockerBuilder8 Version:$VERSION
|
||||
Arguments:
|
||||
-D|--directory (optional) path to solution folder
|
||||
-S|--solution (mandatory) solution name
|
||||
-P|--project (mandatory) project name
|
||||
-p|--port (mandatory) exposed port
|
||||
-G|--git (optional) git URI (gitea.a.ucnit.eu)
|
||||
-U|--gituser (optional) authorized git user (docker | gitea organization)
|
||||
-A|--accesstoken (optional) accesstoken for git user
|
||||
-h|--help this text
|
||||
EOF
|
||||
exit
|
||||
}
|
||||
|
||||
[ $# -eq 0 ] && usage
|
||||
|
||||
DIRECTORY=""
|
||||
SOLUTION=""
|
||||
PROJECT=""
|
||||
EXPOSED_PORT="8080" # Since 2024, port 8080 is the standard web port for .NET
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
-D|--directory)
|
||||
DIRECTORY="$2"
|
||||
shift # past argument
|
||||
shift # past value
|
||||
;;
|
||||
-S|--solution)
|
||||
SOLUTION="$2"
|
||||
shift # past argument
|
||||
shift # past value
|
||||
;;
|
||||
-P|--project)
|
||||
PROJECT="$2"
|
||||
shift # past argument
|
||||
shift # past value
|
||||
;;
|
||||
-p|--port)
|
||||
EXPOSED_PORT="$2"
|
||||
shift # past argument
|
||||
shift # past value
|
||||
;;
|
||||
-G|--git)
|
||||
Git="$2"
|
||||
shift # past argument
|
||||
shift # past value
|
||||
;;
|
||||
-U|--gituser)
|
||||
GitUser="$2"
|
||||
shift # past argument
|
||||
shift # past value
|
||||
;;
|
||||
-A|--accesstoken)
|
||||
AccessToken="$2"
|
||||
shift # past argument
|
||||
shift # past value
|
||||
;;
|
||||
-h|--help)
|
||||
usage
|
||||
;;
|
||||
-*|--*)
|
||||
echo "Unknown option $1"
|
||||
usage
|
||||
;;
|
||||
*)
|
||||
shift # past argument
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
[ -n "$DIRECTORY" ] && cd $DIRECTORY
|
||||
|
||||
|
||||
|
||||
if [ ! -e $SOLUTION/$PROJECT/$PROJECT.csproj ]; then
|
||||
echo "Error, Not found: $SOLUTION/$PROJECT/$PROJECT.csproj"
|
||||
echo "Executed from $(pwd)"
|
||||
cat << EOF
|
||||
Usage:
|
||||
$0 (-S|--solution) solution (-P|--project) project (-p|--port) exposed_port
|
||||
Please call from just outside solution folder
|
||||
EOF
|
||||
echo "Current directory: $(pwd)"
|
||||
exit
|
||||
fi
|
||||
|
||||
RUNDIR=$pwd
|
||||
thisArch=$(uname -m)
|
||||
myRuntime="UNKNOWN"
|
||||
[ "$thisArch" == "x86_64" ] && myRuntime="linux-x64"
|
||||
[ "$thisArch" == "aarch64" ] && myRuntime="linux-arm64"
|
||||
|
||||
# Dockerfile.dotbuild is executed from parent of solution
|
||||
cat << EOF > Dockerfile.dotbuild
|
||||
# Version 2024.01.26 1702
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE $EXPOSED_PORT
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||
WORKDIR /src
|
||||
COPY $SOLUTION ./
|
||||
RUN pwd
|
||||
RUN dotnet restore "$PROJECT/$PROJECT.csproj"
|
||||
RUN dotnet build "$PROJECT/$PROJECT.csproj" -c Release --self-contained --runtime $myRuntime -o /app/build
|
||||
RUN ls -lR /app
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "$PROJECT/$PROJECT.csproj" -c Release --self-contained --runtime $myRuntime -o /app/publish
|
||||
RUN ls -lR /app
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
#ENTRYPOINT ["dotnet", "$PROJECT.dll"]
|
||||
### New section
|
||||
### CHECK_PORTS="mysql:3306 rabbitMQ:5672"
|
||||
COPY start.dotbuild ./kajestartup.sh
|
||||
RUN chmod 755 kajestartup.sh
|
||||
CMD ./kajestartup.sh
|
||||
RUN pwd
|
||||
RUN ls -l
|
||||
RUN cat ./kajestartup.sh
|
||||
EOF
|
||||
|
||||
cat << EOF > start.dotbuild
|
||||
#!/bin/bash
|
||||
echo "Version 22.10.15 1446"
|
||||
if [ -n "\$CHECK_PORTS" ]; then
|
||||
echo "Must check ports before start"
|
||||
! which nc >/dev/null && apt-get update && apt-get -y install netcat
|
||||
for nn in \$(echo "\$CHECK_PORTS" | tr ';' ' '); do
|
||||
xHost=\$(echo "\$nn" | cut -f 1 -d ':')
|
||||
xPort=\$(echo "\$nn" | cut -f 2 -d ':')
|
||||
echo "Checking Host: \$xHost Port: \$xPort"
|
||||
while ! nc -z -v \$xHost \$xPort; do
|
||||
echo "Waiting for Host: \$xHost Port: \$xPort"
|
||||
sleep 5
|
||||
done
|
||||
echo "Checking Host: \$xHost Port: \$xPort ... OK"
|
||||
done
|
||||
echo "Checking ports done..."
|
||||
fi
|
||||
# Adding DOCKER_HOST will cause an entry in /etc/hosts for local access to host platform
|
||||
if [ -n "\$DOCKER_HOST" ] && grep -qv "KAJE" /etc/hosts; then
|
||||
echo "Adding DOCKER_HOST to /etc/hosts"
|
||||
b0=\$(cat /proc/net/route | sed -n '2,2 p' | cut -b 21-22)
|
||||
b1=\$(cat /proc/net/route | sed -n '2,2 p' | cut -b 19-20)
|
||||
b2=\$(cat /proc/net/route | sed -n '2,2 p' | cut -b 17-18)
|
||||
b3=\$(cat /proc/net/route | sed -n '2,2 p' | cut -b 15-16)
|
||||
echo "\$((16#\$b0)).\$((16#\$b1)).\$((16#\$b2)).\$((16#\$b3)) \$DOCKER_HOST" >> /etc/hosts
|
||||
echo "# KAJE WAS HERE" >> /etc/hosts
|
||||
echo "Changed /etc/hosts:"
|
||||
cat /etc/hosts
|
||||
fi
|
||||
echo "Starting: \$(date)"
|
||||
dotnet $PROJECT.dll
|
||||
[ "\$ZOMBIE" == "YES" ] && echo "ZOMBIE STATE ENTERED" && sleep 1d
|
||||
EOF
|
||||
|
||||
# We are just outside solution folder
|
||||
tagName=$(echo "$PROJECT" | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
pwd
|
||||
if [ -e $SOLUTION/$PROJECT/$PROJECT.csproj ]; then
|
||||
echo "Project file OK"
|
||||
else
|
||||
echo "Project file NOK"
|
||||
exit
|
||||
fi
|
||||
echo "--------------"
|
||||
cat ./Dockerfile.dotbuild
|
||||
echo "--------------"
|
||||
|
||||
echo "docker build --file ./Dockerfile.dotbuild --tag=$tagName:latest ."
|
||||
sudo docker build --file ./Dockerfile.dotbuild --tag=$tagName:latest .
|
||||
|
||||
if [ -n "$Git" ]; then
|
||||
CONTAINERNAME=$(echo -n "$Git/$GitUser/$tagName" | tr '[:upper:]' '[:lower:]')
|
||||
sudo docker image rm $CONTAINERNAME:latest
|
||||
sudo docker image rm $CONTAINERNAME:$(date +%y%m%d)
|
||||
sudo docker image tag $tagName:latest $CONTAINERNAME:latest
|
||||
sudo docker image tag $tagName:latest $CONTAINERNAME:$(date +%y%m%d)
|
||||
sudo docker image ls
|
||||
echo "Pushing images to repository"
|
||||
sudo docker login $Git --username=$GitUser --password=$AccessToken
|
||||
echo "docker push $CONTAINERNAME:latest"
|
||||
sudo docker push $CONTAINERNAME:latest
|
||||
echo "docker push $CONTAINERNAME:$(date +%y%m%d)"
|
||||
sudo docker push $CONTAINERNAME:$(date +%y%m%d)
|
||||
|
||||
echo "Cleaning up: [$tagName:latest] [$CONTAINERNAME:latest] [$CONTAINERNAME:$(date +%y%m%d)]"
|
||||
sudo docker image rm $tagName:latest
|
||||
sudo docker image rm $CONTAINERNAME:latest $CONTAINERNAME:$(date +%y%m%d)
|
||||
else
|
||||
echo "Not pushing to package repository as Git[$Git] or GitUser[$GitUser] is blank"
|
||||
fi
|
||||
|
||||
sudo docker image prune --force
|
||||
echo "Done..."
|
||||
@@ -0,0 +1,205 @@
|
||||
#!/bin/bash
|
||||
|
||||
VERSION="2025.05.12-1430"
|
||||
|
||||
usage() {
|
||||
cat << EOF
|
||||
DotDockerBuilder8 Version:$VERSION
|
||||
Arguments:
|
||||
-D|--directory (optional) path to solution folder
|
||||
-S|--solution (mandatory) solution name
|
||||
-P|--project (mandatory) project name
|
||||
-p|--port (mandatory) exposed port
|
||||
-G|--git (optional) git URI (gitea.a.ucnit.eu)
|
||||
-U|--gituser (optional) authorized git user (docker)
|
||||
-A|--accesstoken (optional) accesstoken for git user
|
||||
-h|--help this text
|
||||
EOF
|
||||
exit
|
||||
}
|
||||
|
||||
[ $# -eq 0 ] && usage
|
||||
|
||||
DIRECTORY=""
|
||||
SOLUTION=""
|
||||
PROJECT=""
|
||||
EXPOSED_PORT="80"
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
-D|--directory)
|
||||
DIRECTORY="$2"
|
||||
shift # past argument
|
||||
shift # past value
|
||||
;;
|
||||
-S|--solution)
|
||||
SOLUTION="$2"
|
||||
shift # past argument
|
||||
shift # past value
|
||||
;;
|
||||
-P|--project)
|
||||
PROJECT="$2"
|
||||
shift # past argument
|
||||
shift # past value
|
||||
;;
|
||||
-p|--port)
|
||||
EXPOSED_PORT="$2"
|
||||
shift # past argument
|
||||
shift # past value
|
||||
;;
|
||||
-G|--git)
|
||||
Git="$2"
|
||||
shift # past argument
|
||||
shift # past value
|
||||
;;
|
||||
-U|--gituser)
|
||||
GitUser="$2"
|
||||
shift # past argument
|
||||
shift # past value
|
||||
;;
|
||||
-A|--accesstoken)
|
||||
AccessToken="$2"
|
||||
shift # past argument
|
||||
shift # past value
|
||||
;;
|
||||
-h|--help)
|
||||
usage
|
||||
;;
|
||||
-*|--*)
|
||||
echo "Unknown option $1"
|
||||
usage
|
||||
;;
|
||||
*)
|
||||
shift # past argument
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
[ -n "$DIRECTORY" ] && cd $DIRECTORY
|
||||
|
||||
|
||||
|
||||
if [ ! -e $SOLUTION/$PROJECT/$PROJECT.csproj ]; then
|
||||
echo "Error, Not found: $SOLUTION/$PROJECT/$PROJECT.csproj"
|
||||
echo "Executed from $(pwd)"
|
||||
cat << EOF
|
||||
Usage:
|
||||
$0 (-S|--solution) solution (-P|--project) project (-p|--port) exposed_port
|
||||
Please call from just outside solution folder
|
||||
EOF
|
||||
echo "Current directory: $(pwd)"
|
||||
exit
|
||||
fi
|
||||
|
||||
RUNDIR=$pwd
|
||||
thisArch=$(uname -m)
|
||||
myRuntime="UNKNOWN"
|
||||
[ "$thisArch" == "x86_64" ] && myRuntime="linux-x64"
|
||||
[ "$thisArch" == "aarch64" ] && myRuntime="linux-arm64"
|
||||
|
||||
# Dockerfile.dotbuild is executed from parent of solution
|
||||
cat << EOF > Dockerfile.dotbuild
|
||||
# Version 2024.01.26 1702
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE $EXPOSED_PORT
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
WORKDIR /src
|
||||
COPY $SOLUTION ./
|
||||
RUN pwd
|
||||
RUN dotnet restore "$PROJECT/$PROJECT.csproj"
|
||||
RUN dotnet build "$PROJECT/$PROJECT.csproj" -c Release --self-contained --runtime $myRuntime -o /app/build
|
||||
RUN ls -lR /app
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "$PROJECT/$PROJECT.csproj" -c Release --self-contained --runtime $myRuntime -o /app/publish
|
||||
RUN ls -lR /app
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
#ENTRYPOINT ["dotnet", "$PROJECT.dll"]
|
||||
### New section
|
||||
### CHECK_PORTS="mysql:3306 rabbitMQ:5672"
|
||||
COPY start.dotbuild ./kajestartup.sh
|
||||
RUN chmod 755 kajestartup.sh
|
||||
CMD ./kajestartup.sh
|
||||
RUN pwd
|
||||
RUN ls -l
|
||||
RUN cat ./kajestartup.sh
|
||||
EOF
|
||||
|
||||
cat << EOF > start.dotbuild
|
||||
#!/bin/bash
|
||||
echo "Version 22.10.15 1446"
|
||||
if [ -n "\$CHECK_PORTS" ]; then
|
||||
echo "Must check ports before start"
|
||||
! which nc >/dev/null && apt-get update && apt-get -y install netcat
|
||||
for nn in \$(echo "\$CHECK_PORTS" | tr ';' ' '); do
|
||||
xHost=\$(echo "\$nn" | cut -f 1 -d ':')
|
||||
xPort=\$(echo "\$nn" | cut -f 2 -d ':')
|
||||
echo "Checking Host: \$xHost Port: \$xPort"
|
||||
while ! nc -z -v \$xHost \$xPort; do
|
||||
echo "Waiting for Host: \$xHost Port: \$xPort"
|
||||
sleep 5
|
||||
done
|
||||
echo "Checking Host: \$xHost Port: \$xPort ... OK"
|
||||
done
|
||||
echo "Checking ports done..."
|
||||
fi
|
||||
# Adding DOCKER_HOST will cause an entry in /etc/hosts for local access to host platform
|
||||
if [ -n "\$DOCKER_HOST" ] && grep -qv "KAJE" /etc/hosts; then
|
||||
echo "Adding DOCKER_HOST to /etc/hosts"
|
||||
b0=\$(cat /proc/net/route | sed -n '2,2 p' | cut -b 21-22)
|
||||
b1=\$(cat /proc/net/route | sed -n '2,2 p' | cut -b 19-20)
|
||||
b2=\$(cat /proc/net/route | sed -n '2,2 p' | cut -b 17-18)
|
||||
b3=\$(cat /proc/net/route | sed -n '2,2 p' | cut -b 15-16)
|
||||
echo "\$((16#\$b0)).\$((16#\$b1)).\$((16#\$b2)).\$((16#\$b3)) \$DOCKER_HOST" >> /etc/hosts
|
||||
echo "# KAJE WAS HERE" >> /etc/hosts
|
||||
echo "Changed /etc/hosts:"
|
||||
cat /etc/hosts
|
||||
fi
|
||||
echo "Starting: \$(date)"
|
||||
dotnet $PROJECT.dll
|
||||
[ "\$ZOMBIE" == "YES" ] && echo "ZOMBIE STATE ENTERED" && sleep 1d
|
||||
EOF
|
||||
|
||||
# We are just outside solution folder
|
||||
tagName=$(echo "$PROJECT" | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
pwd
|
||||
if [ -e $SOLUTION/$PROJECT/$PROJECT.csproj ]; then
|
||||
echo "Project file OK"
|
||||
else
|
||||
echo "Project file NOK"
|
||||
exit
|
||||
fi
|
||||
echo "--------------"
|
||||
cat ./Dockerfile.dotbuild
|
||||
echo "--------------"
|
||||
|
||||
echo "docker build --file ./Dockerfile.dotbuild --tag=$tagName:latest ."
|
||||
sudo docker build --file ./Dockerfile.dotbuild --tag=$tagName:latest .
|
||||
|
||||
if [ -n "$Git" ]; then
|
||||
CONTAINERNAME=$(echo -n "$Git/$GitUser/$tagName" | tr '[:upper:]' '[:lower:]')
|
||||
sudo docker image rm $CONTAINERNAME:latest
|
||||
sudo docker image rm $CONTAINERNAME:$(date +%y%m%d)
|
||||
sudo docker image tag $tagName:latest $CONTAINERNAME:latest
|
||||
sudo docker image tag $tagName:latest $CONTAINERNAME:$(date +%y%m%d)
|
||||
sudo docker image ls
|
||||
echo "Pushing images to repository"
|
||||
sudo docker login $Git --username=$GitUser --password=$AccessToken
|
||||
echo "docker push $CONTAINERNAME:latest"
|
||||
sudo docker push $CONTAINERNAME:latest
|
||||
echo "docker push $CONTAINERNAME:$(date +%y%m%d)"
|
||||
sudo docker push $CONTAINERNAME:$(date +%y%m%d)
|
||||
|
||||
echo "Cleaning up: [$tagName:latest] [$CONTAINERNAME:latest] [$CONTAINERNAME:$(date +%y%m%d)]"
|
||||
sudo docker image rm $tagName:latest
|
||||
sudo docker image rm $CONTAINERNAME:latest $CONTAINERNAME:$(date +%y%m%d)
|
||||
fi
|
||||
|
||||
sudo docker image prune --force
|
||||
echo "Done..."
|
||||
@@ -0,0 +1,159 @@
|
||||
pipeline {
|
||||
agent {
|
||||
label 'cicd-builder'
|
||||
}
|
||||
|
||||
environment {
|
||||
// Provided by user
|
||||
//OLLAMA_API_URI = "https://agent:12tf56so@ollama-api.a.ucnit.eu/v1"
|
||||
//OLLAMA_API_KEY = credentials("b8d5c306-99e5-42a6-9825-4da275e9df89")
|
||||
//GITEA_TOKEN = credentials('48bf7c4c-b4c8-4652-bc90-17440e959bf4')
|
||||
//GITEA_API_URL = "https://gitea.a.ucnit.eu/api/v1"
|
||||
|
||||
// Internal paths/artifacts
|
||||
CHANGED_FILES_FILE = "changed_files.txt"
|
||||
TEXT_FILES_FILE = "text_files.txt"
|
||||
SCAN_JSON_FILE = "scan_results.json"
|
||||
REPORT_FILE = "report.md"
|
||||
|
||||
// Optional: Extend/override allowed text extensions (comma-separated, lowercase)
|
||||
// TEXT_FILE_EXTS = "py,js,ts,java,cs,go,rb,php,rs,kt,scala,sh,bash,zsh,ps1,tf,tfvars,yaml,yml,json,ini,conf,properties,toml,xml,gradle,m,mm,sql,md,rst,txt"
|
||||
}
|
||||
|
||||
options {
|
||||
timeout(time: 30, unit: 'MINUTES')
|
||||
timestamps()
|
||||
disableConcurrentBuilds()
|
||||
buildDiscarder(logRotator(numToKeepStr: '20'))
|
||||
}
|
||||
|
||||
parameters {
|
||||
string(name: 'OLLAMA_MODEL', defaultValue: 'llama3.1:8b', description: 'Ollama model to use (e.g., llama3.1, codellama, qwen2.5-coder)')
|
||||
booleanParam(name: 'FAIL_ON_MEDIUM_OR_HIGH', defaultValue: true, description: 'Fail the build if any Medium or higher finding is present')
|
||||
string(name: 'MAX_FILE_BYTES', defaultValue: '200000', description: 'Limit of bytes per file passed to model (to avoid context overflows)')
|
||||
string(name: 'REQUEST_TIMEOUT_SEC', defaultValue: '180', description: 'Per-file analysis timeout (seconds)')
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Remove stale files') {
|
||||
steps {
|
||||
echo "Remove stale files"
|
||||
sh "rm -f $CHANGED_FILES_FILE"
|
||||
sh "rm -f $TEXT_FILES_FILE"
|
||||
sh "rm -f $SCAN_JSON_FILE"
|
||||
sh "rm -f $REPORT_FILE"
|
||||
}
|
||||
}
|
||||
|
||||
stage('List folder content') {
|
||||
steps {
|
||||
echo "List folder content"
|
||||
sh "ls -la"
|
||||
sh "export"
|
||||
}
|
||||
}
|
||||
|
||||
stage('Change to unix files') {
|
||||
steps {
|
||||
echo "Change to unix files"
|
||||
sh "! which dos2unix || sudo apt-get install -y dos2unix"
|
||||
sh "/bin/dos2unix .workflow/* .workflow/*"
|
||||
sh "/bin/chmod +x .workflow/* .workflow/*"
|
||||
}
|
||||
}
|
||||
|
||||
stage('Prepare & Verify') {
|
||||
steps {
|
||||
sh 'chmod +x .workflow/*.sh || true'
|
||||
sh '.workflow/verify_environment.sh'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build all projects') {
|
||||
steps {
|
||||
echo "Build all projects"
|
||||
sh ".workflow/01_dotnet_build.sh"
|
||||
}
|
||||
}
|
||||
|
||||
stage('Detect Changes') {
|
||||
when {
|
||||
branch 'Security'
|
||||
}
|
||||
steps {
|
||||
sh ".workflow/get_changed_files.sh \"$CHANGED_FILES_FILE\""
|
||||
archiveArtifacts artifacts: "$CHANGED_FILES_FILE", allowEmptyArchive: true
|
||||
}
|
||||
}
|
||||
|
||||
stage('Filter Text Files') {
|
||||
when {
|
||||
branch 'Security'
|
||||
}
|
||||
steps {
|
||||
sh ".workflow/filter_text_files.sh \"$CHANGED_FILES_FILE\" \"$TEXT_FILES_FILE\""
|
||||
archiveArtifacts artifacts: "$TEXT_FILES_FILE", allowEmptyArchive: true
|
||||
}
|
||||
}
|
||||
|
||||
stage('Scan with Ollama') {
|
||||
when {
|
||||
branch 'Security'
|
||||
}
|
||||
steps {
|
||||
sh ".workflow/scan_with_ollama.sh \"$TEXT_FILES_FILE\" \"$SCAN_JSON_FILE\" \"$OLLAMA_MODEL\" \"$MAX_FILE_BYTES\" \"$REQUEST_TIMEOUT_SEC\""
|
||||
archiveArtifacts artifacts: "$SCAN_JSON_FILE", allowEmptyArchive: true
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build Markdown Report') {
|
||||
when {
|
||||
branch 'Security'
|
||||
}
|
||||
steps {
|
||||
sh ".workflow/build_markdown_report.sh \"$SCAN_JSON_FILE\" \"$REPORT_FILE\""
|
||||
archiveArtifacts artifacts: "$REPORT_FILE", allowEmptyArchive: true
|
||||
}
|
||||
}
|
||||
|
||||
stage('Report to Gitea (Issue)') {
|
||||
when {
|
||||
branch 'Security'
|
||||
}
|
||||
steps {
|
||||
sh ".workflow/create_gitea_issue.sh \"$REPORT_FILE\""
|
||||
}
|
||||
}
|
||||
|
||||
stage('Quality Gate') {
|
||||
when {
|
||||
branch 'Security'
|
||||
}
|
||||
steps {
|
||||
sh ".workflow/evaluate_threshold.sh \"$SCAN_JSON_FILE\" \"$FAIL_ON_MEDIUM_OR_HIGH\""
|
||||
}
|
||||
}
|
||||
|
||||
stage('Docker container release') {
|
||||
when {
|
||||
branch 'Docker'
|
||||
}
|
||||
steps {
|
||||
echo "Build container(s)"
|
||||
sh ".workflow/01_container_build.sh"
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
archiveArtifacts allowEmptyArchive: true, artifacts: "${CHANGED_FILES_FILE}, ${TEXT_FILES_FILE}, ${SCAN_JSON_FILE}, ${REPORT_FILE}"
|
||||
// Cleanup after build (if success)
|
||||
cleanWs(cleanWhenNotBuilt: false,
|
||||
deleteDirs: true,
|
||||
disableDeferredWipeout: true,
|
||||
notFailBuild: true,
|
||||
patterns: [[pattern: '.gitignore', type: 'INCLUDE'],
|
||||
[pattern: '.propsfile', type: 'EXCLUDE']])
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
Jenkinsfile with AI provisions
|
||||
|
||||
The Build Agent should provide the following environment (in alphabetical order):
|
||||
- GITEA_AGENT in clear text cicd-builder
|
||||
- GITEA_API_URL in clear text https://gitea.a.ucnit.eu/api/v1
|
||||
- GITEA_API_KEY in clear text
|
||||
- GIT_USER in clear text
|
||||
- MAX_FILE_BYTES in clear text
|
||||
- OLLAMA_API_KEY through credentials:secret text
|
||||
- OLLAMA_API_URI in clear text https://agent:12tf56so@ollama-api.a.ucnit.eu/v1
|
||||
- OLLAMA_MODEL in clear text
|
||||
- REQUEST_TIMEOUT_SEC through credentials:secret text
|
||||
- FILE_EXTS in clear text (cshtml,cs,js,json)
|
||||
|
||||
And the following settings
|
||||
- Remote root directory ~/jenkins
|
||||
- Labels builder
|
||||
- Launch method Launch agents via ssh
|
||||
- Host Key Verification Strategy Not verifying
|
||||
\ No newline at end of file
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
IN_JSON="${1:-scan_results.json}"
|
||||
OUT_MD="${2:-report.md}"
|
||||
|
||||
if [[ ! -s "$IN_JSON" ]]; then
|
||||
echo "# Security Scan Report" > "$OUT_MD"
|
||||
echo "_No results available (empty input)._" >> "$OUT_MD"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
BRANCH="${BRANCH_NAME:-${GIT_BRANCH:-unknown}}"
|
||||
SHA="${GIT_COMMIT:-unknown}"
|
||||
SHORT_SHA="${SHA:0:7}"
|
||||
|
||||
TOTAL_FILES=$(jq 'length' "$IN_JSON")
|
||||
TOTAL_FINDINGS=$(jq '[.[].findings] | flatten | length' "$IN_JSON")
|
||||
LOW=$(jq '[.[].findings] | flatten | map(select(.severity=="LOW")) | length' "$IN_JSON")
|
||||
MED=$(jq '[.[].findings] | flatten | map(select(.severity=="MEDIUM")) | length' "$IN_JSON")
|
||||
HIGH=$(jq '[.[].findings] | flatten | map(select(.severity=="HIGH")) | length' "$IN_JSON")
|
||||
CRIT=$(jq '[.[].findings] | flatten | map(select(.severity=="CRITICAL")) | length' "$IN_JSON")
|
||||
|
||||
{
|
||||
echo "# Security Scan Report (Ollama)"
|
||||
echo ""
|
||||
echo "- **Branch**: \`${BRANCH}\`"
|
||||
echo "- **Commit**: \`${SHORT_SHA}\`"
|
||||
echo "- **Files analyzed**: ${TOTAL_FILES}"
|
||||
echo "- **Total findings**: ${TOTAL_FINDINGS}"
|
||||
echo ""
|
||||
echo "### Severity Summary"
|
||||
echo ""
|
||||
echo "| Severity | Count |"
|
||||
echo "|-----------|------:|"
|
||||
echo "| CRITICAL | ${CRIT} |"
|
||||
echo "| HIGH | ${HIGH} |"
|
||||
echo "| MEDIUM | ${MED} |"
|
||||
echo "| LOW | ${LOW} |"
|
||||
echo ""
|
||||
echo "---"
|
||||
echo "## Per-File Findings"
|
||||
echo ""
|
||||
} > "$OUT_MD"
|
||||
|
||||
file_count=$(jq 'length' "$IN_JSON")
|
||||
if [[ "$file_count" -eq 0 ]]; then
|
||||
echo "_No files were scanned._" >> "$OUT_MD"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Helper: safe cell formatter via jq (strip newlines and excessive whitespace)
|
||||
# We do not export a function; we let jq do formatting inline per row.
|
||||
|
||||
for i in $(seq 0 $((file_count-1))); do
|
||||
file_path=$(jq -r ".[$i].file" "$IN_JSON")
|
||||
findings_len=$(jq -r ".[$i].findings | length" "$IN_JSON")
|
||||
|
||||
echo "### \`$file_path\`" >> "$OUT_MD"
|
||||
echo "" >> "$OUT_MD"
|
||||
|
||||
if [[ "$findings_len" -eq 0 ]]; then
|
||||
echo "_No issues found._" >> "$OUT_MD"
|
||||
echo "" >> "$OUT_MD"
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "| Severity | Line | Rule ID | Description | Recommendation |" >> "$OUT_MD"
|
||||
echo "|----------|-----:|---------|-------------|----------------|" >> "$OUT_MD"
|
||||
|
||||
# Notes:
|
||||
# - Replace CRLF and LF with spaces via gsub("\r?\n"; " ")
|
||||
# - Collapse all whitespace via gsub("[[:space:]]+"; " ")
|
||||
# - Trim leading/trailing spaces using sub and gsub
|
||||
jq -r ".[$i].findings[] |
|
||||
[
|
||||
(.severity // \"\"),
|
||||
(if (.line|type==\"number\") then (.line|tostring) else \"\" end),
|
||||
(.rule_id // \"\"),
|
||||
((.description // \"\")
|
||||
| gsub(\"\\r?\\n\"; \" \")
|
||||
| gsub(\"[[:space:]]+\"; \" \")
|
||||
| sub(\"^ \"; \"\")
|
||||
| sub(\" $\"; \"\")),
|
||||
((.recommendation // \"\")
|
||||
| gsub(\"\\r?\\n\"; \" \")
|
||||
| gsub(\"[[:space:]]+\"; \" \")
|
||||
| sub(\"^ \"; \"\")
|
||||
| sub(\" $\"; \"\"))
|
||||
]
|
||||
| \"| \" + (.[0]) + \" | \" + (.[1]) + \" | \" + (.[2]) + \" | \" + (.[3]) + \" | \" + (.[4]) + \" |\"
|
||||
" "$IN_JSON" >> "$OUT_MD"
|
||||
|
||||
# References (if present)
|
||||
refs_count=$(jq ".[$i].findings | map(select(.references != null and (.references|length>0))) | length" "$IN_JSON")
|
||||
if [[ "$refs_count" -gt 0 ]]; then
|
||||
echo "" >> "$OUT_MD"
|
||||
echo "**References**:" >> "$OUT_MD"
|
||||
jq -r ".[$i].findings[] | select(.references != null) | .references[]? | \"- \" + tostring" "$IN_JSON" >> "$OUT_MD"
|
||||
fi
|
||||
|
||||
echo "" >> "$OUT_MD"
|
||||
done
|
||||
|
||||
echo "[INFO] Markdown report generated: $OUT_MD"
|
||||
``
|
||||
@@ -0,0 +1,86 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
BODY_FILE="${1:-report.md}"
|
||||
|
||||
if [[ ! -f "$BODY_FILE" ]]; then
|
||||
echo "[WARN] Report file not found: $BODY_FILE. Skipping Gitea issue creation."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# If report says no files or no findings, you may decide NOT to create an issue.
|
||||
#HAS_FINDINGS=$(grep -E "Total findings: [1-9][0-9]*" -i "$BODY_FILE" || true)
|
||||
HAS_FINDINGS=$(cat report.md | grep "Total findings\*\*" | grep -v ": 0" || true)
|
||||
if [[ -z "$HAS_FINDINGS" ]]; then
|
||||
echo "[INFO] No findings detected. Not creating a Gitea issue."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
GITEA_AGENT="CICD-SYSTEM" # temporarily set this
|
||||
|
||||
: "${GITEA_API_URL:?Missing GITEA_API_URL}"
|
||||
: "${GITEA_API_KEY:?Missing GITEA_API_KEY}"
|
||||
: "${GITEA_AGENT:?Missing GITEA_AGENT}"
|
||||
# GITEA_REPO_OWNER=$(git remote show origin | grep "^ Fetch" | cut -f 4 -d '/')
|
||||
# echo "Will report issue to: [$GITEA_REPO_OWNER]"
|
||||
|
||||
# Parse owner/repo from GIT_URL
|
||||
: "${GIT_URL:?Missing GIT_URL in Jenkins env}"
|
||||
# Handle formats: https://gitea.example.com/owner/repo.git or git@gitea.example.com:owner/repo.git
|
||||
OWNER=""
|
||||
REPO=""
|
||||
GIT=""
|
||||
if echo "$GIT_URL" | grep -q "^http"; then
|
||||
GIT=$(echo "$GIT_URL" | cut -f 3 -d '/')
|
||||
OWNER=$(echo "$GIT_URL" | cut -f 4 -d '/')
|
||||
REPO=$(echo "$GIT_URL" | cut -f 5 -d '/' | xargs -- basename -s .git)
|
||||
fi
|
||||
if echo "$GIT_URL" | grep -q "^git@"; then
|
||||
GIT=$(echo "$GIT_URL" | cut -f 2 -d '@' | cut -f 1 -d ':')
|
||||
OWNER=$(echo "$GIT_URL" | cut -f 2 -d ':' | cut -f 1 -d '/')
|
||||
REPO=$(echo "$GIT_URL" | cut -f 2 -d '/' | xargs -- basename -s .git)
|
||||
fi
|
||||
if [[ -z "$OWNER" || -z "$REPO" ]]; then
|
||||
echo "[ERROR] Could not determine owner/repo from GIT_URL=$GIT_URL"
|
||||
exit 1
|
||||
fi
|
||||
echo "Will report issue to [$OWNER][$REPO]"
|
||||
|
||||
BRANCH="${BRANCH_NAME:-${GIT_BRANCH:-unknown}}"
|
||||
SHA="${GIT_COMMIT:-unknown}"
|
||||
SHORT_SHA="${SHA:0:7}"
|
||||
JOB_URL="${BUILD_URL:-}"
|
||||
|
||||
TITLE="[security-scan] ${OWNER}/${REPO} @ ${BRANCH} (${SHORT_SHA})"
|
||||
LABELS='["security-scan","ollama"]'
|
||||
|
||||
# Build JSON payload safely
|
||||
BODY_JSON=$(jq -Rs . < "$BODY_FILE")
|
||||
ASSIGNEES_JSON=$(jq -n --arg u "$GITEA_AGENT" 'if ($u|length) > 0 then [$u] else [] end')
|
||||
|
||||
PAYLOAD=$(jq -n --arg title "$TITLE" --argjson body "$BODY_JSON" --argjson labels "$LABELS" --argjson assignees "$ASSIGNEES_JSON" \
|
||||
'{title:$title, body:$body, labels:$labels, assignees:$assignees}')
|
||||
|
||||
PAYLOAD=$(jq -n --arg title "$TITLE" --argjson body "$BODY_JSON" --argjson labels "$LABELS" --argjson assignees "$ASSIGNEES_JSON" \
|
||||
'{title:$title, body:$body}')
|
||||
|
||||
#DEBUG
|
||||
API_URL="${GITEA_API_URL%/}/repos/${OWNER}/${REPO}/issues"
|
||||
echo "[INFO] Creating Gitea issue at ${API_URL} [$GITEA_API_KEY]"
|
||||
echo "[DEBUG] PAYLOAD=[$PAYLOAD]"
|
||||
|
||||
# Gitea supports "token" auth header
|
||||
RESP=$(curl -sS -X POST "$API_URL" \
|
||||
-H "Authorization: token $GITEA_API_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$PAYLOAD")
|
||||
|
||||
ISSUE_NUM=$(echo "$RESP" | jq -r '.number // empty')
|
||||
|
||||
if [[ -n "$ISSUE_NUM" ]]; then
|
||||
echo "[OK] Created issue #$ISSUE_NUM"
|
||||
else
|
||||
echo "[ERROR] Failed to create issue. Response:"
|
||||
echo "$RESP"
|
||||
exit 1
|
||||
fi
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
JSON_FILE="${1:-scan_results.json}"
|
||||
FAIL_ON_MED_OR_HIGH="${2:-true}"
|
||||
|
||||
if [[ ! -s "$JSON_FILE" ]]; then
|
||||
echo "[INFO] No scan results file present; nothing to evaluate."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
MED_PLUS=$(jq '[.[].findings] | flatten | map(select(.severity=="MEDIUM" or .severity=="HIGH" or .severity=="CRITICAL")) | length' "$JSON_FILE")
|
||||
CRIT=$(jq '[.[].findings] | flatten | map(select(.severity=="CRITICAL")) | length' "$JSON_FILE")
|
||||
HIGH=$(jq '[.[].findings] | flatten | map(select(.severity=="HIGH")) | length' "$JSON_FILE")
|
||||
MED=$(jq '[.[].findings] | flatten | map(select(.severity=="MEDIUM")) | length' "$JSON_FILE")
|
||||
|
||||
echo "[INFO] Findings by severity => CRITICAL: ${CRIT}, HIGH: ${HIGH}, MEDIUM: ${MED}"
|
||||
|
||||
if [[ "${FAIL_ON_MED_OR_HIGH,,}" == "true" ]]; then
|
||||
if [[ "$MED_PLUS" -gt 0 ]]; then
|
||||
echo "[FAIL] Medium or higher findings detected (${MED_PLUS}). Failing the build as configured."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "[OK] Quality gate passed."
|
||||
@@ -0,0 +1,169 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# ======================================================================
|
||||
# Arguments
|
||||
# ======================================================================
|
||||
|
||||
CHANGED_FILES="${1:-changed_files.txt}"
|
||||
OUTPUT_FILE="${2:-text_files.txt}"
|
||||
FILE_EXTS="${3:-}" # override whitelist extensions
|
||||
CLI_EXCLUDES="${4:-}" # override exclusion paths
|
||||
CLI_MAX_SIZE="${5:-}" # override max size per file (bytes)
|
||||
|
||||
# ======================================================================
|
||||
# Extension whitelist (default)
|
||||
# ======================================================================
|
||||
|
||||
DEFAULT_EXTS="c,cpp,h,hpp,py,js,jsx,ts,tsx,java,cs,go,rb,php,rs,kt,scala,sh,bash,zsh,ps1,tf,tfvars,yaml,yml,json,ini,conf,properties,toml,xml,gradle,m,mm,sql,md,rst,txt"
|
||||
|
||||
if [ -n "$FILE_EXTS" ]; then
|
||||
EXTS_RAW="$FILE_EXTS"
|
||||
elif [ -n "${TEXT_FILE_EXTS:-}" ]; then
|
||||
EXTS_RAW="$TEXT_FILE_EXTS"
|
||||
else
|
||||
EXTS_RAW="$DEFAULT_EXTS"
|
||||
fi
|
||||
|
||||
IFS=',' read -ra EXT_WHITELIST <<< "$(echo "$EXTS_RAW" | tr '[:upper:]' '[:lower:]' | tr -d ' ')"
|
||||
|
||||
# ======================================================================
|
||||
# Exclusions paths
|
||||
# ======================================================================
|
||||
|
||||
if [[ -n "$CLI_EXCLUDES" ]]; then
|
||||
EXCLUDES_RAW="$CLI_EXCLUDES"
|
||||
elif [[ -n "${SCAN_EXCLUDE_PATHS:-}" ]]; then
|
||||
EXCLUDES_RAW="$SCAN_EXCLUDE_PATHS"
|
||||
else
|
||||
EXCLUDES_RAW=""
|
||||
fi
|
||||
|
||||
IFS=',' read -ra EXCLUDE_PATHS <<< "$(echo "$EXCLUDES_RAW" | tr -d ' ')"
|
||||
|
||||
# ======================================================================
|
||||
# Maximum file-size limit
|
||||
# ======================================================================
|
||||
|
||||
if [[ -n "$CLI_MAX_SIZE" ]]; then
|
||||
MAX_SIZE="$CLI_MAX_SIZE"
|
||||
elif [[ -n "${MAX_SCAN_FILE_BYTES:-}" ]]; then
|
||||
MAX_SIZE="$MAX_SCAN_FILE_BYTES"
|
||||
else
|
||||
MAX_SIZE="0" # 0 = no limit
|
||||
fi
|
||||
|
||||
# ======================================================================
|
||||
# Special no-extension text files
|
||||
# ======================================================================
|
||||
|
||||
SPECIAL_NAMES=(
|
||||
"dockerfile"
|
||||
"makefile"
|
||||
".gitignore"
|
||||
".gitattributes"
|
||||
".editorconfig"
|
||||
)
|
||||
|
||||
echo "[INFO] Extension whitelist: ${EXT_WHITELIST[*]}"
|
||||
echo "[INFO] Exclusion paths: ${EXCLUDE_PATHS[*]}"
|
||||
echo "[INFO] Max allowed file size (bytes): ${MAX_SIZE}"
|
||||
echo "[INFO] Special text files: ${SPECIAL_NAMES[*]}"
|
||||
|
||||
> "$OUTPUT_FILE"
|
||||
|
||||
# ======================================================================
|
||||
# Helper: Check if file should be excluded by path
|
||||
# ======================================================================
|
||||
should_exclude_path() {
|
||||
local path="$1"
|
||||
for ex in "${EXCLUDE_PATHS[@]}"; do
|
||||
[[ -z "$ex" ]] && continue
|
||||
if [[ "$path" == "$ex"* ]]; then
|
||||
return 0 # true -> excluded
|
||||
fi
|
||||
done
|
||||
return 1 # false -> not excluded
|
||||
}
|
||||
|
||||
# ======================================================================
|
||||
# Helper: Check file size against MAX_SIZE
|
||||
# ======================================================================
|
||||
is_too_large() {
|
||||
local file="$1"
|
||||
local size
|
||||
size=$(wc -c < "$file" | tr -d ' ')
|
||||
if [ $MAX_SIZE -gt 0 ] && [ $size -gt $MAX_SIZE ]; then
|
||||
echo "[DEBUG] Excluded due to size ($size > $MAX_SIZE): $file"
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
# ======================================================================
|
||||
# Main loop
|
||||
# ======================================================================
|
||||
while IFS= read -r FILEPATH; do
|
||||
[[ -z "$FILEPATH" ]] && continue
|
||||
|
||||
# Skip files that do not exist
|
||||
[[ ! -f "$FILEPATH" ]] && continue
|
||||
|
||||
# 1. Path exclusion
|
||||
if should_exclude_path "$FILEPATH"; then
|
||||
echo "[DEBUG] Excluded by path: $FILEPATH"
|
||||
continue
|
||||
fi
|
||||
|
||||
BASENAME="$(basename "$FILEPATH")"
|
||||
BASENAME_LC="$(echo "$BASENAME" | tr '[:upper:]' '[:lower:]')"
|
||||
|
||||
# 2. Special file names
|
||||
for special in "${SPECIAL_NAMES[@]}"; do
|
||||
if [[ "$BASENAME_LC" == "$special" ]]; then
|
||||
if is_too_large "$FILEPATH"; then continue; fi
|
||||
echo "$FILEPATH" >> "$OUTPUT_FILE"
|
||||
continue 2
|
||||
fi
|
||||
done
|
||||
|
||||
# 3. Extract extension
|
||||
if [[ "$FILEPATH" == *.* ]]; then
|
||||
EXT="${FILEPATH##*.}"
|
||||
else
|
||||
EXT=""
|
||||
fi
|
||||
|
||||
EXT_LC="$(echo "$EXT" | tr '[:upper:]' '[:lower:]')"
|
||||
|
||||
# 4. If no extension: skip (specials already handled)
|
||||
if [[ -z "$EXT_LC" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# 5. If not in whitelist: skip
|
||||
in_whitelist=false
|
||||
for allowed in "${EXT_WHITELIST[@]}"; do
|
||||
if [[ "$EXT_LC" == "$allowed" ]]; then
|
||||
in_whitelist=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
[[ "$in_whitelist" == false ]] && continue
|
||||
|
||||
# 6. File size check
|
||||
if is_too_large "$FILEPATH"; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# 7. Add to output
|
||||
echo "$FILEPATH" >> "$OUTPUT_FILE"
|
||||
|
||||
done < "$CHANGED_FILES"
|
||||
|
||||
# ======================================================================
|
||||
# Summary
|
||||
# ======================================================================
|
||||
COUNT=$(wc -l < "$OUTPUT_FILE" | tr -d ' ')
|
||||
echo "[INFO] Filter complete → $COUNT files selected"
|
||||
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
OUT_FILE="${1:-changed_files.txt}"
|
||||
touch "$OUT_FILE"
|
||||
|
||||
# Fetch quietly; repo might be shallow in CI
|
||||
git fetch --all --quiet || true
|
||||
|
||||
if [[ -n "${CHANGE_TARGET:-}" ]]; then
|
||||
# Multibranch PR build: compare against target branch
|
||||
git fetch origin "${CHANGE_TARGET}" --quiet || true
|
||||
BASE="origin/${CHANGE_TARGET}"
|
||||
echo "[INFO] PR build detected, diffing against ${BASE}..."
|
||||
git diff --name-only --diff-filter=ACMRT "${BASE}...HEAD" > "$OUT_FILE" || true
|
||||
else
|
||||
# Branch build: diff from previous successful commit (best effort), else last commit
|
||||
if [[ -n "${GIT_PREVIOUS_SUCCESSFUL_COMMIT:-}" ]]; then
|
||||
BASE="${GIT_PREVIOUS_SUCCESSFUL_COMMIT}"
|
||||
echo "[INFO] Diffing against previous successful commit ${BASE}..."
|
||||
git diff --name-only --diff-filter=ACMRT "${BASE}" "HEAD" > "$OUT_FILE" || true
|
||||
else
|
||||
echo "[INFO] No previous successful commit found; using last commit diff (HEAD~1..HEAD)..."
|
||||
git diff --name-only --diff-filter=ACMRT "HEAD~1" "HEAD" > "$OUT_FILE" || true
|
||||
fi
|
||||
fi
|
||||
|
||||
# Clean blank lines, ensure file exists
|
||||
sed -i '/^\s*$/d' "$OUT_FILE" || true
|
||||
touch "$OUT_FILE"
|
||||
|
||||
COUNT=$(wc -l < "$OUT_FILE" | tr -d ' ')
|
||||
echo "[INFO] Changed files: ${COUNT}"
|
||||
@@ -0,0 +1,138 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
FILES_LIST="${1:-text_files.txt}"
|
||||
OUT_JSON="${2:-scan_results.json}"
|
||||
OLLAMA_MODEL="${3:-llama3.1:8b}"
|
||||
MAX_FILE_BYTES="${4:-200000}"
|
||||
REQUEST_TIMEOUT_SEC="${5:-180}"
|
||||
|
||||
if [[ ! -s "$FILES_LIST" ]]; then
|
||||
echo "[]" > "$OUT_JSON"
|
||||
echo "[INFO] No text files to scan. Generated empty JSON: $OUT_JSON"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
TMP_DIR=".workflow/scan"
|
||||
[ -d $TMP_DIR ] && rm -rf $TMP_DIR
|
||||
mkdir -p $TMP_DIR
|
||||
|
||||
SYS_PROMPT=$'You are a precise secure code scanning assistant. Analyze the provided file content and return findings as STRICT JSON only with this schema:\n{\n "findings": [\n {\n "severity": "LOW|MEDIUM|HIGH|CRITICAL",\n "rule_id": "string-identifier",\n "line": number|null,\n "description": "short human-readable description",\n "recommendation": "concise fix guidance",\n "references": ["optional references URLs or identifiers"]\n }\n ]\n}\nRules:\n- Output ONLY JSON. No markdown, no code fences, no commentary.\n- If no issues, output {\"findings\":[]}.\n- Prefer concrete, reproducible findings over theoretical. Highlight secrets, insecure configs, vulnerable patterns, risky dependencies (if visible), command injection, path traversal, deserialization, SSRF, XSS, SQLi, hardcoded credentials, bad crypto, weak TLS, etc.\n- Provide line numbers when confidently known; otherwise null.\n'
|
||||
|
||||
SYS_PROMPT=$(cat << EOF
|
||||
You are a precise secure code scanning assistant. Analyze the provided file content and return findings as STRICT JSON only with this schema:
|
||||
{
|
||||
"findings": [
|
||||
{
|
||||
"severity": "LOW|MEDIUM|HIGH|CRITICAL",
|
||||
"rule_id": "string-identifier",
|
||||
"line": number|null,
|
||||
"description": "short human-readable description",
|
||||
"recommendation": "concise fix guidance",
|
||||
"references": ["optional references URLs or identifiers"]
|
||||
}
|
||||
]
|
||||
}
|
||||
Rules:
|
||||
- Output ONLY JSON. No markdown, no code fences, no commentary.
|
||||
- If no issues, output {\"findings\":[]}.
|
||||
- Prefer concrete, reproducible findings over theoretical. Highlight secrets, insecure configs, vulnerable patterns, risky dependencies (if visible), command injection, path traversal, deserialization, SSRF, XSS, SQLi, hardcoded credentials, bad crypto, weak TLS, etc.
|
||||
- Provide line numbers when confidently known; otherwise null.
|
||||
EOF
|
||||
)
|
||||
|
||||
|
||||
export idx=0
|
||||
for file in $(cat "$FILES_LIST"); do
|
||||
if [[ ! -f "$file" ]]; then
|
||||
echo "[WARN] Skipping missing file: $file"
|
||||
continue
|
||||
fi
|
||||
idx=$((idx+1))
|
||||
|
||||
ext="${file##*.}"
|
||||
base="$(basename "$file")"
|
||||
code_tmp="$TMP_DIR/code_$idx.bin"
|
||||
head -c "$MAX_FILE_BYTES" "$file" | LC_ALL=C tr -d '\0' > "$code_tmp"
|
||||
bytes=$(wc -c < "$code_tmp" | tr -d ' ')
|
||||
|
||||
req_json="$TMP_DIR/req_$idx.json"
|
||||
jq -n \
|
||||
--arg model "$OLLAMA_MODEL" \
|
||||
--arg sys "$SYS_PROMPT" \
|
||||
--arg f "$file" \
|
||||
--arg ext "$ext" \
|
||||
--rawfile code "$code_tmp" \
|
||||
'{
|
||||
model: $model,
|
||||
temperature: 0,
|
||||
stream: false,
|
||||
messages: [
|
||||
{role: "system", content: $sys},
|
||||
{role: "user", content: ("Analyze the following " +
|
||||
(if $ext == "" then "text" else $ext end) +
|
||||
" file named \"" + $f + "\" and return ONLY JSON as specified. File content between <<FILE>> markers:
|
||||
<<FILE>>
|
||||
" +
|
||||
$code + "
|
||||
<<FILE>>
|
||||
")}
|
||||
]
|
||||
}' > "$req_json"
|
||||
|
||||
echo "[INFO] [$idx] Scanning $file (${bytes} bytes) with model=$OLLAMA_MODEL ..."
|
||||
resp_json="$TMP_DIR/resp_$idx.json"
|
||||
set +e
|
||||
# HERE BE DRAGONS
|
||||
echo "[DEBUG] endpoint=[${OLLAMA_API_URI%/}/chat/completions]"
|
||||
echo "[DEBUG] Authorization: Bearer ${OLLAMA_API_KEY}"
|
||||
|
||||
http_code=$(curl -sS -w "%{http_code}" -o "$resp_json" \
|
||||
--max-time "$REQUEST_TIMEOUT_SEC" --connect-timeout 10 \
|
||||
-H "Authorization: Bearer ${OLLAMA_API_KEY}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d @"$req_json" \
|
||||
"${OLLAMA_API_URI%/}/chat/completions")
|
||||
rc=$?
|
||||
set -e
|
||||
|
||||
if [[ $rc -ne 0 || "$http_code" -lt 200 || "$http_code" -ge 300 ]]; then
|
||||
echo "[ERROR] Ollama request failed for $file (rc=$rc, http=$http_code)."
|
||||
# Create a synthetic "tool-error" entry
|
||||
echo "{\"file\":\"$file\",\"findings\":[{\"severity\":\"LOW\",\"rule_id\":\"tool-error\",\"line\":null,\"description\":\"Ollama request failed (rc=$rc, http=$http_code)\",\"recommendation\":\"Re-run scan or check Ollama endpoint/credentials\",\"references\":[]}],\"model\":\"$OLLAMA_MODEL\",\"bytes_analyzed\":$bytes}" \
|
||||
> "$TMP_DIR/file_$idx.json"
|
||||
continue
|
||||
fi
|
||||
|
||||
# Extract assistant message content (model output)
|
||||
content=$(jq -r '.choices[0].message.content // ""' "$resp_json")
|
||||
|
||||
# Try to parse content as JSON; if it has code fences, strip them
|
||||
parsed_ok=1
|
||||
echo "$content" | jq . > "$TMP_DIR/json_${idx}_raw.json" 2>/dev/null || parsed_ok=0
|
||||
if [[ $parsed_ok -eq 0 ]]; then
|
||||
content_stripped="$(printf "%s" "$content" | sed -E 's/^```(json)?[[:space:]]*//; s/```$//')"
|
||||
echo "$content_stripped" | jq . > "$TMP_DIR/json_${idx}_raw.json" 2>/dev/null || parsed_ok=0
|
||||
else
|
||||
parsed_ok=1
|
||||
fi
|
||||
|
||||
if [[ $parsed_ok -eq 0 ]]; then
|
||||
echo "[WARN] Model did not return valid JSON for $file. Wrapping as tool-error."
|
||||
echo "{\"file\":\"$file\",\"findings\":[{\"severity\":\"LOW\",\"rule_id\":\"invalid-json\",\"line\":null,\"description\":\"Model returned non-JSON content\",\"recommendation\":\"Adjust prompt or model; ensure strict JSON output\",\"references\":[]}],\"model\":\"$OLLAMA_MODEL\",\"bytes_analyzed\":$bytes}" \
|
||||
> "$TMP_DIR/file_$idx.json"
|
||||
else
|
||||
# Normalize to object with findings array
|
||||
jq --arg file "$file" --arg model "$OLLAMA_MODEL" --argjson bytes "$bytes" '
|
||||
. as $orig
|
||||
| (if (has("findings") and (.findings|type=="array")) then $orig else {"findings": []} end)
|
||||
| . + {file:$file, model:$model, bytes_analyzed:$bytes}
|
||||
' "$TMP_DIR/json_${idx}_raw.json" > "$TMP_DIR/file_$idx.json"
|
||||
fi
|
||||
done
|
||||
|
||||
# Combine all per-file results into a single JSON array
|
||||
jq -s '.' "$TMP_DIR"/file_*.json > "$OUT_JSON"
|
||||
TOTAL=$(jq 'length' "$OUT_JSON")
|
||||
echo "[INFO] Completed scan for ${TOTAL} file(s). Output: $OUT_JSON"
|
||||
``
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# Basic preflight checks.
|
||||
for bin in git curl jq; do
|
||||
if ! command -v "$bin" >/dev/null 2>&1; then
|
||||
echo "[ERROR] Required binary not found: $bin"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Validate envs that must be present.
|
||||
: "${OLLAMA_API_URI:?Missing env OLLAMA_API_URI}"
|
||||
: "${OLLAMA_API_KEY:?Missing env OLLAMA_API_KEY}"
|
||||
: "${GITEA_API_URL:?Missing env GITEA_API_URL}"
|
||||
: "${GITEA_API_KEY:?Missing env GITEA_APP_KEY}"
|
||||
|
||||
echo "[OK] Preflight checks passed (git/curl/jq available and required env vars set)."
|
||||
@@ -0,0 +1,10 @@
|
||||
FROM busybox:1.37
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
USER www-data
|
||||
|
||||
COPY . .
|
||||
|
||||
# Run BusyBox httpd on port 8080
|
||||
CMD ["busybox", "httpd", "-f", "-v", "-p", "8080"]
|
||||
@@ -1,11 +1,11 @@
|
||||
WWW SQL Designer allows users to create database designs, which can be saved/loaded and exported to SQL scripts. Various databases and languages are supported. Ability to import existing database design.
|
||||
|
||||
[[YouTube video](http://www.youtube.com/watch?v=hCQzJx9AKhU)]
|
||||
[YouTube video](http://www.youtube.com/watch?v=hCQzJx9AKhU), [User manual](https://github.com/ondras/wwwsqldesigner/wiki/Manual)
|
||||
|
||||
# About
|
||||
|
||||
Hi and welcome to WWW SQL Designer! This tool allows you to draw and create database schemas (E-R diagrams) directly in browser, without the need for any external programs (flash). You only need JavaScript enabled.
|
||||
The Designer works perfectly in Mozillas (Firefox, Seamonkey), Internet Explorers (6, 7, 8), Safari and Operas. Konqueror works, but the experience is limited.
|
||||
The Designer works perfectly in Chrome, Mozilla (Firefox, Seamonkey), Internet Explorer, MS Edge, Safari and Opera.
|
||||
|
||||
Many database features are supported, such as keys, foreign key constraints, comments and indexes. You can either save your design (for further loading & modifications), print it or export as SQL script. It is possible to retrieve (import) schema from existing database.
|
||||
|
||||
@@ -13,6 +13,30 @@ WWW SQL Designer was created by [Ondrej Zara](http://ondras.zarovi.cz/) and is b
|
||||
|
||||
If you wish to support this project, <a href='https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3340079'><img src='https://www.paypal.com/en_GB/i/btn/btn_donate_LG.gif' alt='Donate at PayPal' title='Donate at PayPal' /></a> at PayPal!
|
||||
|
||||
# Quick Start
|
||||
|
||||
## Local Installation:
|
||||
|
||||
1. `npm install http-server -g`
|
||||
2. Run `http-server` in the root of this repo to start a simple http server
|
||||
3. Visit http://127.0.0.1:8080
|
||||
|
||||
## Docker Installation:
|
||||
|
||||
1. Build `docker build -t wwwsqldesigner .`
|
||||
2. Run `docker run -d -p 8080:8080 wwwsqldesigner`
|
||||
3. Visit http://127.0.0.1:8080
|
||||
|
||||
## Code Style
|
||||
Please use the following auto formatters to maintain the code style
|
||||
|
||||
| File | Remarks | Formatter |
|
||||
|-----------------|-------------------|----------------------------------------------------------------------------------|
|
||||
| `/index.html` | | VSCode built-in formatter |
|
||||
| `/js/*.js` | 4 spaces for tabs | https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode |
|
||||
| `/styles/*.css` | | https://marketplace.visualstudio.com/items?itemName=aeschli.vscode-css-formatter |
|
||||
| `/locale/*.xml` | | https://marketplace.visualstudio.com/items?itemName=DotJoshJohnson.xml |
|
||||
|
||||
# News
|
||||
|
||||
## Moved to GitHub
|
||||
@@ -67,6 +91,6 @@ The project was recently moved to Google Code hosting, which (amongst many other
|
||||
|
||||
## 2.0 is here
|
||||
|
||||
Good news: A new version of WWW SQL Designer, rewritten from scratch, is now available. I has many new features, including bezier connectors, support for various customizations, localization, options and more.
|
||||
Good news: A new version of WWW SQL Designer, rewritten from scratch, is now available. It has many new features, including bezier connectors, support for various customizations, localization, options and more.
|
||||
|
||||
Bad news: This new version is not backwards compatible with 1.x, so all old localizations and XSLT templates won't work with 2.x. Sorry for inconvenience :/
|
||||
@@ -13,9 +13,9 @@
|
||||
$keyword = "data/".basename($keyword);
|
||||
$f = fopen($keyword, "w");
|
||||
$data = file_get_contents("php://input");
|
||||
if (get_magic_quotes_gpc() || get_magic_quotes_runtime()) {
|
||||
$data = stripslashes($data);
|
||||
}
|
||||
// if (get_magic_quotes_gpc() || get_magic_quotes_runtime()) {
|
||||
// $data = stripslashes($data);
|
||||
// }
|
||||
fwrite($f, $data);
|
||||
fclose($f);
|
||||
header("HTTP/1.0 201 Created");
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<?php
|
||||
function import() {
|
||||
$db = (isset($_GET["database"]) ? $_GET["database"] : "information_schema");
|
||||
$db = mysql_real_escape_string($db);
|
||||
$mysqli = mysqli_connect(HOST,USER,PASS,DB);
|
||||
$db = mysqli_real_escape_string($mysqli,$db);
|
||||
$xml = "";
|
||||
|
||||
$arr = array();
|
||||
@@ -12,16 +13,16 @@
|
||||
$arr[] = $datatypes[$i];
|
||||
}
|
||||
|
||||
$result = mysql_query("SELECT * FROM TABLES WHERE TABLE_SCHEMA = '".$db."'");
|
||||
while ($row = mysql_fetch_array($result)) {
|
||||
$result = mysqli_query($mysqli,"SELECT * FROM TABLES WHERE TABLE_SCHEMA = '".$db."'");
|
||||
while ($row = mysqli_fetch_array($result)) {
|
||||
$table = $row["TABLE_NAME"];
|
||||
$xml .= '<table name="'.$table.'">';
|
||||
$comment = (isset($row["TABLE_COMMENT"]) ? $row["TABLE_COMMENT"] : "");
|
||||
if ($comment) { $xml .= '<comment>'.$comment.'</comment>'; }
|
||||
|
||||
$q = "SELECT * FROM COLUMNS WHERE TABLE_NAME = '".$table."' AND TABLE_SCHEMA = '".$db."'";
|
||||
$result2 = mysql_query($q);
|
||||
while ($row = mysql_fetch_array($result2)) {
|
||||
$result2 = mysqli_query($mysqli,$q);
|
||||
while ($row = mysqli_fetch_array($result2)) {
|
||||
$name = $row["COLUMN_NAME"];
|
||||
$type = $row["COLUMN_TYPE"];
|
||||
$comment = (isset($row["COLUMN_COMMENT"]) ? $row["COLUMN_COMMENT"] : "");
|
||||
@@ -43,9 +44,9 @@
|
||||
WHERE CONSTRAINT_TYPE = 'FOREIGN KEY'
|
||||
AND c.TABLE_SCHEMA = '".$db."' AND c.TABLE_NAME = '".$table."'
|
||||
AND k.COLUMN_NAME = '".$name."'";
|
||||
$result3 = mysql_query($q);
|
||||
$result3 = mysqli_query($mysqli,$q);
|
||||
|
||||
while ($row = mysql_fetch_array($result3)) {
|
||||
while ($row = mysqli_fetch_array($result3)) {
|
||||
$xml .= '<relation table="'.$row["table"].'" row="'.$row["column"].'" />';
|
||||
}
|
||||
|
||||
@@ -54,10 +55,10 @@
|
||||
|
||||
/* keys */
|
||||
$q = "SELECT * FROM STATISTICS WHERE TABLE_NAME = '".$table."' AND TABLE_SCHEMA = '".$db."' ORDER BY SEQ_IN_INDEX ASC";
|
||||
$result2 = mysql_query($q);
|
||||
$result2 = mysqli_query($mysqli,$q);
|
||||
$idx = array();
|
||||
|
||||
while ($row = mysql_fetch_array($result2)) {
|
||||
while ($row = mysqli_fetch_array($result2)) {
|
||||
$name = $row["INDEX_NAME"];
|
||||
if (array_key_exists($name, $idx)) {
|
||||
$obj = $idx[$name];
|
||||
|
||||
@@ -162,9 +162,6 @@
|
||||
$keyword = (isset($_GET["keyword"]) ? $_GET["keyword"] : "");
|
||||
$keyword = mysqli_real_escape_string($DBHandler->getLink(), $keyword);
|
||||
$data = file_get_contents("php://input");
|
||||
if (get_magic_quotes_gpc() || get_magic_quotes_runtime()) {
|
||||
$data = stripslashes($data);
|
||||
}
|
||||
$data = mysqli_real_escape_string($DBHandler->getLink(), $data);
|
||||
$r = mysqli_query($DBHandler->getLink(), "SELECT * FROM ".TABLE." WHERE keyword = '".$keyword."'");
|
||||
if (mysqli_num_rows($r) > 0) {
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
$conn = pg_connect($str);
|
||||
if (!$conn){
|
||||
header("HTTP/1.0 503 Service Unavailable");
|
||||
break;
|
||||
}
|
||||
return $conn;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
$access_key = $_ENV['AWS_S3_ID'];
|
||||
$secret_key = $_ENV['AWS_S3_KEY'];
|
||||
$bucket = $_ENV['BUCKET_NAME'];
|
||||
$region = $_ENV['AWS_REGION'];
|
||||
$path = 'schemas';
|
||||
if (!$access_key || !$secret_key || !$bucket) {
|
||||
header("HTTP/1.0 501 Credentials not provided!");
|
||||
return;
|
||||
}
|
||||
|
||||
include('amazon-s3-php/src/S3.php');
|
||||
$client = new S3($access_key, $secret_key, 's3-'.$region.'.amazonaws.com');
|
||||
|
||||
$a = (isset($_GET["action"]) ? $_GET["action"] : false);
|
||||
switch ($a) {
|
||||
case "list":
|
||||
$response = $client->getBucket($bucket);
|
||||
foreach ($response->body->Contents as $content) {
|
||||
$key = $content->Key;
|
||||
if (0 === strpos($key, $path.'/') && $key != $path.'/')
|
||||
echo substr($key, strlen($path)+1)."\n";
|
||||
}
|
||||
break;
|
||||
case "save":
|
||||
$keyword = (isset($_GET["keyword"]) ? $_GET["keyword"] : "");
|
||||
$data = file_get_contents("php://input");
|
||||
$client->putObject($bucket, $path.'/'.$keyword, $data, array('Content-Type' => 'text/xml'));
|
||||
header("HTTP/1.0 201 Created");
|
||||
break;
|
||||
case "load":
|
||||
$keyword = (isset($_GET["keyword"]) ? $_GET["keyword"] : "");
|
||||
$file = $client->getObject($bucket, $path.'/'.$keyword);
|
||||
if ($file->body) {
|
||||
header("Content-type: text/xml");
|
||||
echo $file->body;
|
||||
} else {
|
||||
header("HTTP/1.0 404 Not Found");
|
||||
}
|
||||
break;
|
||||
default: header("HTTP/1.0 501 Not Implemented");
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0"?>
|
||||
<datatypes db="web2py">
|
||||
<group label="Numeric" color="rgb(238,238,170)">
|
||||
<type label="Integer" length="1" sql="integer" re="INTEGER" quote=""/>
|
||||
<type label="Double precision" length="1" sql="double" re="DOUBLE" quote=""/>
|
||||
</group>
|
||||
<group label="Character" color="rgb(255,200,200)">
|
||||
<type label="String" length="1" sql="string" quote="'"/>
|
||||
<type label="Text" length="1" sql="text" quote="'"/>
|
||||
<type label="BLOB" length="1" sql="blob" quote="'"/>
|
||||
</group>
|
||||
<group label="Date & Time" color="rgb(200,255,200)">
|
||||
<type label="Time" length="0" sql="time" quote="'"/>
|
||||
<type label="Date" length="0" sql="date" quote="'"/>
|
||||
<type label="Datetime" length="0" sql="datetime" quote="'"/>
|
||||
</group>
|
||||
<group label="Miscellaneous" color="rgb(200,200,255)">
|
||||
<type label="Boolean" length="0" sql="boolean" quote=""/>
|
||||
<type label="Upload" length="0" sql="upload" quote=""/>
|
||||
<type label="Password" length="0" sql="password" quote=""/>
|
||||
</group>
|
||||
</datatypes>
|
||||
@@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?>
|
||||
<!-- License public domain -->
|
||||
<!-- Created by Boris Manojlovic <boris DOT manojlovic AT steki DOT net> -->
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:output method="text"/>
|
||||
<xsl:template name="replace-substring">
|
||||
<xsl:param name="value"/>
|
||||
<xsl:param name="from"/>
|
||||
<xsl:param name="to"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($value,$from)">
|
||||
<xsl:value-of select="substring-before($value,$from)"/>
|
||||
<xsl:value-of select="$to"/>
|
||||
<xsl:call-template name="replace-substring">
|
||||
<xsl:with-param name="value" select="substring-after($value,$from)"/>
|
||||
<xsl:with-param name="from" select="$from"/>
|
||||
<xsl:with-param name="to" select="$to"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$value"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
<!-- return length of element-->
|
||||
<xsl:template name="getsize">
|
||||
<xsl:param name="invalue"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($invalue,'(')">
|
||||
<xsl:variable name="part" select="substring-after($invalue,'(')"/>
|
||||
<xsl:value-of select="substring-before($part,')')"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
<!-- return web2py python representation of table -->
|
||||
<xsl:template name="tableparser">
|
||||
<xsl:param name="tabledata"/>
|
||||
<xsl:text>dbOBJECT.define_table("</xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:text>",</xsl:text>
|
||||
<xsl:for-each select="row">
|
||||
<xsl:choose>
|
||||
<!-- ignore id fields as web2py needs it for building relations and will create them automatically -->
|
||||
<xsl:when test="not(@name = 'id')">
|
||||
<xsl:text>
 Field("</xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="not (relation)">
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:text>", </xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(datatype,'(')">
|
||||
<xsl:text>"</xsl:text>
|
||||
<xsl:value-of select="substring-before(datatype,'(')"/>
|
||||
<xsl:text>", length=</xsl:text>
|
||||
<xsl:call-template name="getsize">
|
||||
<xsl:with-param name="invalue" select="datatype"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>"</xsl:text>
|
||||
<xsl:value-of select="datatype"/>
|
||||
<xsl:text>", </xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="@null = 0">
|
||||
<xsl:text>notnull=True, </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="default">
|
||||
<xsl:text>default=</xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="default = 'NULL'">
|
||||
<xsl:text>None</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="default"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>default=None</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:text>", dbOBJECT.</xsl:text>
|
||||
<xsl:for-each select="relation">
|
||||
<xsl:value-of select="@table"/>
|
||||
</xsl:for-each>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
<xsl:if test="not (@name = 'id')">
|
||||
<xsl:text>)</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="not (position()=last())">
|
||||
<xsl:if test="not (@name = 'id')">
|
||||
<xsl:text>,</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<!-- keys -->
|
||||
<!-- maybe something else except unique??-->
|
||||
<xsl:for-each select="key">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type = 'UNIQUE'">unique=True</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
<xsl:text>)</xsl:text>
|
||||
<xsl:text>

</xsl:text>
|
||||
</xsl:template>
|
||||
<!-- parsing db xml file -->
|
||||
<xsl:template match="/sql">
|
||||
<xsl:text>""" database class object creation (initialization) """
</xsl:text>
|
||||
<xsl:text>if request.env.web2py_runtime_gae: # if running on Google App Engine 
</xsl:text>
|
||||
<xsl:text> db = DAL('gae') # connect to Google BigTable 
</xsl:text>
|
||||
<xsl:text> session.connect(request, response, db=db) # and store sessions and tickets there 
</xsl:text>
|
||||
<xsl:text>else: # else use a normal relational database 
</xsl:text>
|
||||
<xsl:text> dbOBJECT = SQLDB("sqlite://dbOBJECT.db")

</xsl:text>
|
||||
<!-- doing two pass: first ignore tables with relations as they will raise exception if table referenced still does not exist (not instantiated) -->
|
||||
<!-- this is not bullet proff but should be sufficient for small projects will be in TODO :) -->
|
||||
<xsl:for-each select="table">
|
||||
<xsl:if test="not (row/relation)">
|
||||
<xsl:call-template name="tableparser">
|
||||
<xsl:with-param name="tabledata" select="table"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<!-- calling second pass ignore non relation tables -->
|
||||
<xsl:for-each select="table">
|
||||
<xsl:if test="row/relation">
|
||||
<xsl:call-template name="tableparser">
|
||||
<xsl:with-param name="tabledata" select="table"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<!-- end of for-each select="table" -->
|
||||
<!-- fk -->
|
||||
<xsl:text>""" Relations between tables (remove fields you don't need from requires) """
</xsl:text>
|
||||
<!-- dbOBJECT.druga.prva_id.requires=IS_IN_DB(db, 'auth_user.id','%(id)s: %(first_name)s %(last_name)s') -->
|
||||
<xsl:for-each select="table">
|
||||
<xsl:for-each select="row">
|
||||
<xsl:for-each select="relation">
|
||||
<xsl:variable name="tablename">
|
||||
<xsl:value-of select="@table"/>
|
||||
</xsl:variable>
|
||||
<xsl:text>dbOBJECT.</xsl:text>
|
||||
<xsl:value-of select="../../@name"/>
|
||||
<xsl:text>.</xsl:text>
|
||||
<xsl:value-of select="../@name"/>
|
||||
<xsl:text>.requires=IS_IN_DB( dbOBJECT, '</xsl:text>
|
||||
<xsl:value-of select="@table"/>
|
||||
<xsl:text>.id', '</xsl:text>
|
||||
<!-- hardcoded as this is expected from web2py every table to have anyway :) -->
|
||||
<xsl:for-each select="//table">
|
||||
<!-- have to do this way to find our table->row->names-->
|
||||
<xsl:if test="@name = $tablename">
|
||||
<xsl:for-each select="row">
|
||||
<xsl:if test="not(@name = 'id') and not(datatype = 'password')">
|
||||
<!-- do not show password and id fields by default in select box -->
|
||||
<xsl:text> %(</xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:text>)s</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:text>')
</xsl:text>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
@@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<sql>
|
||||
<datatypes db="web2py">
|
||||
<group label="Numeric" color="rgb(238,238,170)">
|
||||
<type label="Integer" length="1" sql="integer" re="INTEGER" quote=""/>
|
||||
<type label="Double precision" length="1" sql="double" re="DOUBLE" quote=""/>
|
||||
</group>
|
||||
<group label="Character" color="rgb(255,200,200)">
|
||||
<type label="String" length="1" sql="string" quote="'"/>
|
||||
<type label="Text" length="1" sql="text" quote="'"/>
|
||||
<type label="BLOB" length="1" sql="blob" quote="'"/>
|
||||
</group>
|
||||
<group label="Date & Time" color="rgb(200,255,200)">
|
||||
<type label="Time" length="0" sql="time" quote="'"/>
|
||||
<type label="Date" length="0" sql="date" quote="'"/>
|
||||
<type label="Datetime" length="0" sql="datetime" quote="'"/>
|
||||
</group>
|
||||
<group label="Miscellaneous" color="rgb(200,200,255)">
|
||||
<type label="Boolean" length="0" sql="boolean" quote=""/>
|
||||
<type label="Upload" length="0" sql="upload" quote=""/>
|
||||
<type label="Password" length="0" sql="password" quote=""/>
|
||||
</group>
|
||||
</datatypes>
|
||||
<table x="498" y="174" name="projects">
|
||||
<row name="id" null="1" autoincrement="1">
|
||||
<datatype>integer</datatype>
|
||||
<default>NULL</default>
|
||||
</row>
|
||||
<row name="name" null="1" autoincrement="0">
|
||||
<datatype>string(50)</datatype>
|
||||
<default>'newproject'</default>
|
||||
</row>
|
||||
<row name="created" null="1" autoincrement="0">
|
||||
<datatype>datetime</datatype>
|
||||
<default>'request.now'</default>
|
||||
</row>
|
||||
<row name="users_id" null="1" autoincrement="0">
|
||||
<datatype>integer</datatype>
|
||||
<default>NULL</default>
|
||||
<relation table="users" row="id"/>
|
||||
</row>
|
||||
<row name="categories_id" null="1" autoincrement="0">
|
||||
<datatype>integer</datatype>
|
||||
<default>NULL</default>
|
||||
<relation table="categories" row="id"/>
|
||||
</row>
|
||||
<row name="locked" null="1" autoincrement="0">
|
||||
<datatype>boolean</datatype>
|
||||
<default>False</default>
|
||||
</row>
|
||||
<key type="PRIMARY" name="">
|
||||
<part>id</part>
|
||||
</key>
|
||||
</table>
|
||||
<table x="244" y="64" name="data">
|
||||
<row name="id" null="1" autoincrement="1">
|
||||
<datatype>integer</datatype>
|
||||
<default>NULL</default>
|
||||
</row>
|
||||
<row name="id_projects" null="1" autoincrement="0">
|
||||
<datatype>integer</datatype>
|
||||
<default>NULL</default>
|
||||
<relation table="projects" row="id"/>
|
||||
</row>
|
||||
<row name="created" null="1" autoincrement="0">
|
||||
<datatype>datetime</datatype>
|
||||
<default>'request.now'</default>
|
||||
</row>
|
||||
<row name="data" null="1" autoincrement="0">
|
||||
<datatype>blob</datatype>
|
||||
</row>
|
||||
<key type="PRIMARY" name="">
|
||||
<part>id</part>
|
||||
</key>
|
||||
</table>
|
||||
<table x="518" y="63" name="tags">
|
||||
<row name="id" null="1" autoincrement="1">
|
||||
<datatype>integer</datatype>
|
||||
<default>NULL</default>
|
||||
</row>
|
||||
<row name="name" null="1" autoincrement="0">
|
||||
<datatype>string</datatype>
|
||||
</row>
|
||||
<key type="PRIMARY" name="">
|
||||
<part>id</part>
|
||||
</key>
|
||||
</table>
|
||||
<table x="721" y="65" name="projects_tags">
|
||||
<row name="id" null="1" autoincrement="1">
|
||||
<datatype>integer</datatype>
|
||||
<default>NULL</default>
|
||||
</row>
|
||||
<row name="tags_id" null="1" autoincrement="0">
|
||||
<datatype>integer</datatype>
|
||||
<default>NULL</default>
|
||||
<relation table="tags" row="id"/>
|
||||
</row>
|
||||
<row name="projects_id" null="1" autoincrement="0">
|
||||
<datatype>integer</datatype>
|
||||
<default>NULL</default>
|
||||
<relation table="projects" row="id"/>
|
||||
</row>
|
||||
<key type="PRIMARY" name="">
|
||||
<part>id</part>
|
||||
</key>
|
||||
</table>
|
||||
<table x="735" y="236" name="categories">
|
||||
<row name="id" null="1" autoincrement="1">
|
||||
<datatype>integer</datatype>
|
||||
<default>NULL</default>
|
||||
</row>
|
||||
<row name="name" null="1" autoincrement="0">
|
||||
<datatype>string</datatype>
|
||||
</row>
|
||||
<key type="PRIMARY" name="">
|
||||
<part>id</part>
|
||||
</key>
|
||||
</table>
|
||||
<table x="265" y="291" name="users">
|
||||
<row name="id" null="1" autoincrement="1">
|
||||
<datatype>integer</datatype>
|
||||
<default>NULL</default>
|
||||
</row>
|
||||
<row name="firstname" null="1" autoincrement="0">
|
||||
<datatype>string(50)</datatype>
|
||||
</row>
|
||||
<row name="lastname" null="1" autoincrement="0">
|
||||
<datatype>string(50)</datatype>
|
||||
</row>
|
||||
<row name="email" null="1" autoincrement="0">
|
||||
<datatype>string</datatype>
|
||||
<datatype>string(80)</datatype>
|
||||
<default>'email@domain.com'</default>
|
||||
</row>
|
||||
<row name="username" null="1" autoincrement="0">
|
||||
<datatype>string(50)</datatype>
|
||||
</row>
|
||||
<row name="password" null="1" autoincrement="0">
|
||||
<datatype>password</datatype>
|
||||
</row>
|
||||
<key type="PRIMARY" name="">
|
||||
<part>id</part>
|
||||
</key>
|
||||
</table>
|
||||
</sql>
|
||||
@@ -1,30 +1,29 @@
|
||||
<?xml version="1.0"?>
|
||||
<datatypes db="oracle">
|
||||
<group label="Number" color="rgb(238,238,170)">
|
||||
<type label="NUMERIC" length="0" sql="DECIMAL" re="INT" quote="" />
|
||||
<type label="NUMBER" length="0" sql="DECIMAL" re="INT" quote="" />
|
||||
<type label="Decimal" length="1" sql="DECIMAL" re="DEC" quote="" />
|
||||
<type label="Single precision" length="0" sql="FLOAT" quote="" />
|
||||
<type label="Double precision" length="0" sql="DOUBLE" re="DOUBLE" quote="" />
|
||||
<type label="INTEGER" length="0" sql="INTEGER" re="INT" quote="" />
|
||||
<type label="NUMBER" length="1" sql="NUMBER" re="INT" quote="" />
|
||||
</group>
|
||||
|
||||
<group label="Character" color="rgb(255,200,200)">
|
||||
<type label="Char" length="1" sql="CHAR" quote="'"/>
|
||||
<type label="CHAR" length="1" sql="CHAR" quote="'"/>
|
||||
<type label="VARCHAR2" length="1" sql="VARCHAR2" quote="'"/>
|
||||
<type label="CLOB" length="0" sql="CLOB" re="TEXT" quote="'"/>
|
||||
<type label="NCHAR" length="1" sql="NCHAR" quote="'"/>
|
||||
<type label="Varchar2" length="1" sql="VARCHAR2" quote="'"/>
|
||||
<type label="CLOB" length="0" sql="MEDIUMTEXT" re="TEXT" quote="'"/>
|
||||
<type label="Binary" length="1" sql="BINARY" quote="'"/>
|
||||
<type label="Varbinary" length="1" sql="VARBINARY" quote="'"/>
|
||||
<type label="BLOB" length="0" sql="BLOB" re="BLOB" quote="'"/>
|
||||
<type label="NVARCHAR2" length="1" sql="NVARCHAR2" quote="'"/>
|
||||
<type label="NCLOB" length="0" sql="NCLOB" re="TEXT" quote="'"/>
|
||||
</group>
|
||||
|
||||
<group label="Date & Time" color="rgb(200,255,200)">
|
||||
<type label="Date" length="0" sql="DATE" quote="'" />
|
||||
<type label="Timestamp" length="0" sql="TIMESTAMP" quote="'" />
|
||||
<type label="DATE" length="0" sql="DATE" quote="" />
|
||||
<type label="TIMESTAMP" length="1" sql="TIMESTAMP" quote="" />
|
||||
</group>
|
||||
|
||||
<group label="Miscellaneous" color="rgb(200,200,255)">
|
||||
<type label="ENUM" length="1" sql="ENUM" quote="" />
|
||||
<type label="SET" length="1" sql="SET" quote="" />
|
||||
<group label="Other" color="rgb(200,200,255)">
|
||||
<type label="RAW" length="1" sql="RAW" quote="'"/>
|
||||
<type label="BLOB" length="0" sql="BLOB" re="BLOB" quote="'"/>
|
||||
<type label="DECIMAL" length="1" sql="DECIMAL" re="DEC" quote="" />
|
||||
<type label="FLOAT" length="1" sql="FLOAT" quote="" />
|
||||
<type label="DOUBLE" length="0" sql="DOUBLE PRECISION" quote="" />
|
||||
</group>
|
||||
</datatypes>
|
||||
|
||||
@@ -1,85 +1,200 @@
|
||||
<?xml version="1.0" ?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<!-- Define which symbol to use for quoting identifiers, may be empty -->
|
||||
<xsl:variable name="quote">"</xsl:variable>
|
||||
|
||||
<!-- Predefine useful global variables -->
|
||||
<xsl:variable name="apos" >'</xsl:variable>
|
||||
<xsl:variable name="crlf" ><xsl:text>
|
||||
</xsl:text></xsl:variable>
|
||||
<!-- |"MAXIMUM_ORACLE_COLUMN_NAME_LEN"| -->
|
||||
<xsl:variable name="padding_name"><xsl:text> </xsl:text></xsl:variable>
|
||||
<!-- |VARCHAR2(4000 CHAR) | -->
|
||||
<xsl:variable name="padding_type"><xsl:text> </xsl:text></xsl:variable>
|
||||
<xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz'" />
|
||||
<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
|
||||
|
||||
<xsl:output method="text"/>
|
||||
|
||||
<xsl:template name="replace-substring">
|
||||
<xsl:param name="value" />
|
||||
<xsl:param name="from" />
|
||||
<xsl:param name="to" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($value,$from)">
|
||||
<xsl:value-of select="substring-before($value,$from)" />
|
||||
<xsl:value-of select="$to" />
|
||||
<xsl:call-template name="replace-substring">
|
||||
<xsl:with-param name="value" select="substring-after($value,$from)" />
|
||||
<xsl:with-param name="from" select="$from" />
|
||||
<xsl:with-param name="to" select="$to" />
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$value" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<!-- Quotes oracle identifier, if required (if it contains non-uppercase letters)-->
|
||||
<xsl:template name="ora_ident">
|
||||
<xsl:param name="ident"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="translate( $ident, $smallcase, $uppercase ) = $ident">
|
||||
<xsl:value-of select="$ident" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="concat( $quote, $ident, $quote )"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Constructs FK constraint name from 2 table names, fitted into 30 symbols per identifier limitation -->
|
||||
<xsl:template name="ora_fk_constraint_name">
|
||||
<xsl:param name="tbl_fr"/>
|
||||
<xsl:param name="tbl_to"/>
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="concat( 'FK_', substring( $tbl_fr, 1 + string-length( $tbl_fr ) - ( 30 - 4 ) div 2 )
|
||||
, '_', substring( $tbl_to, 1 + string-length( $tbl_to ) - ( 30 - 4 ) div 2 ) )" />
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="replace-substring">
|
||||
<xsl:param name="value" />
|
||||
<xsl:param name="from" />
|
||||
<xsl:param name="to" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($value,$from)">
|
||||
<xsl:value-of select="substring-before($value,$from)" />
|
||||
<xsl:value-of select="$to" />
|
||||
<xsl:call-template name="replace-substring">
|
||||
<xsl:with-param name="value" select="substring-after($value,$from)" />
|
||||
<xsl:with-param name="from" select="$from" />
|
||||
<xsl:with-param name="to" select="$to" />
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$value" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="/sql">
|
||||
|
||||
<!-- Generate commented DROPs for same objects that later would be created. This is useful when re-creating DB schema. -->
|
||||
<xsl:if test="0 < count( table )">
|
||||
<xsl:value-of select="concat( $crlf, '/*' )"/>
|
||||
<xsl:for-each select="table">
|
||||
<xsl:variable name="tbl_fr" select="@name" />
|
||||
<xsl:for-each select="row">
|
||||
<xsl:for-each select="relation">
|
||||
<xsl:variable name="tbl_to" select="@table" />
|
||||
<xsl:value-of select="concat( $crlf, 'ALTER TABLE ', '' )"/>
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="$tbl_fr" />
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat( ' DROP CONSTRAINT ', '' )"/>
|
||||
<xsl:call-template name="ora_fk_constraint_name">
|
||||
<xsl:with-param name="tbl_fr" select="$tbl_fr" />
|
||||
<xsl:with-param name="tbl_to" select="$tbl_to" />
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat( ';', '' )"/>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
|
||||
<xsl:for-each select="table">
|
||||
<xsl:variable name="table" select="@name" />
|
||||
<xsl:value-of select="concat( $crlf, 'DROP TABLE ' )" />
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="$table" />
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat( ' PURGE;', '' )" />
|
||||
<xsl:if test="0 < count( row[@autoincrement = 1] )">
|
||||
<xsl:for-each select="row[@autoincrement = 1]">
|
||||
<xsl:value-of select="concat( $crlf, 'DROP SEQUENCE ' )"/>
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="concat( 'SQ_', $table )" />
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat( ';', '' )"/>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
|
||||
<xsl:value-of select="concat( $crlf, '-- */' )"/>
|
||||
</xsl:if>
|
||||
|
||||
<!-- tables -->
|
||||
<xsl:for-each select="table">
|
||||
<xsl:variable name="table" select="@name" />
|
||||
<xsl:text>CREATE TABLE `</xsl:text>
|
||||
<xsl:value-of select="@name" />
|
||||
<xsl:text>` (
|
||||
</xsl:text>
|
||||
<xsl:value-of select="concat( $crlf, '' )" />
|
||||
<xsl:value-of select="concat( $crlf, '-------------------------------------------------------------------------------' )" />
|
||||
<xsl:value-of select="concat( $crlf, '-- ', $table )" />
|
||||
<xsl:value-of select="concat( $crlf, '-------------------------------------------------------------------------------' )" />
|
||||
<xsl:value-of select="concat( $crlf, '' )" />
|
||||
<xsl:value-of select="concat( $crlf, 'CREATE TABLE ' )" />
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="$table" />
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat( ' (', '' )" />
|
||||
<xsl:for-each select="row">
|
||||
<xsl:text>`</xsl:text>
|
||||
<xsl:value-of select="@name" />
|
||||
<xsl:text>` </xsl:text>
|
||||
<xsl:if test="position()=1">
|
||||
<xsl:value-of select="concat( $crlf, ' ' )" />
|
||||
</xsl:if>
|
||||
<xsl:if test="not (position()=1)">
|
||||
<xsl:value-of select="concat( $crlf, ' , ' )" />
|
||||
</xsl:if>
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="@name" />
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:value-of select="datatype" />
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="concat( substring( $padding_name, 1, string-length( $padding_name ) - string-length( @name ) )
|
||||
, datatype )" />
|
||||
|
||||
<xsl:if test="default and not ( default = 'NULL' )">
|
||||
<xsl:value-of select="concat( substring( $padding_type, 1, string-length( $padding_type ) - string-length( datatype ) )
|
||||
, 'DEFAULT ', default )" />
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="@null = 0">
|
||||
<xsl:text>NOT NULL </xsl:text>
|
||||
<xsl:value-of select="concat( substring( $padding_type, 1, string-length( $padding_type ) - string-length( datatype ) )
|
||||
, 'NOT NULL' )" />
|
||||
</xsl:if>
|
||||
|
||||
<!-- needs to be fixed using sequences
|
||||
<xsl:if test="@autoincrement = 1">
|
||||
<xsl:text>AUTO_INCREMENT </xsl:text>
|
||||
</xsl:if>
|
||||
-->
|
||||
|
||||
<xsl:if test="default">
|
||||
<xsl:text>DEFAULT </xsl:text>
|
||||
<xsl:value-of select="default" />
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="not (position()=last())">
|
||||
<xsl:text>,
|
||||
</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
|
||||
<!-- keys -->
|
||||
<xsl:for-each select="key">
|
||||
<xsl:text>,
|
||||
</xsl:text>
|
||||
<xsl:value-of select="concat( $crlf, ' , CONSTRAINT ' )" />
|
||||
<xsl:if test="@name">
|
||||
<!-- if KEY constraint name was specified - use it -->
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="@name" />
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type = 'PRIMARY'">PRIMARY KEY (</xsl:when>
|
||||
<xsl:when test="@type = 'FULLTEXT'">FULLTEXT KEY (</xsl:when>
|
||||
<xsl:when test="@type = 'UNIQUE'">UNIQUE KEY (</xsl:when>
|
||||
<xsl:otherwise>KEY (</xsl:otherwise>
|
||||
<xsl:when test="@type = 'PRIMARY'" >
|
||||
<xsl:if test="@name = ''">
|
||||
<!-- if PK KEY constraint name was NOT specified - invent it -->
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="concat( 'PK_', ../@name )" />
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="concat( ' PRIMARY KEY', '' )" />
|
||||
</xsl:when>
|
||||
<xsl:when test="@type = 'UNIQUE'" >
|
||||
<xsl:if test="@name = ''">
|
||||
<!-- if QU KEY constraint name was NOT specified - invent it -->
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="concat( 'UQ_', position() )" />
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="concat( ' UNIQUE', '' )" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!-- if other? KEY constraint name was NOT specified - invent it -->
|
||||
<xsl:if test="@name = ''">
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="concat( 'KK_', position() )" />
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="concat( ' ??', @type, '??' )" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!-- comma -separated list of columns -->
|
||||
<xsl:text> ( </xsl:text>
|
||||
<xsl:for-each select="part">
|
||||
<xsl:text>`</xsl:text><xsl:value-of select="." /><xsl:text>`</xsl:text>
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="." />
|
||||
</xsl:call-template>
|
||||
<xsl:if test="not (position() = last())">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:text>)</xsl:text>
|
||||
|
||||
<xsl:text> )</xsl:text>
|
||||
</xsl:for-each>
|
||||
|
||||
<xsl:text>
|
||||
@@ -87,53 +202,125 @@
|
||||
</xsl:text>
|
||||
|
||||
<xsl:if test="comment">
|
||||
<xsl:text>COMMENT ON TABLE `</xsl:text>
|
||||
<xsl:value-of select="@name" />
|
||||
<xsl:text>` IS '</xsl:text>
|
||||
<xsl:value-of select="concat( $crlf, 'COMMENT ON TABLE ' )"/>
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="@name" />
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat( $padding_name, ' IS ', $apos )"/>
|
||||
<xsl:call-template name="replace-substring">
|
||||
<xsl:with-param name="value" select="comment" />
|
||||
<xsl:with-param name="from" select='"'"' />
|
||||
<xsl:with-param name="to" select='"''"' />
|
||||
</xsl:call-template>
|
||||
<xsl:text>';
|
||||
</xsl:text>
|
||||
<xsl:value-of select="concat( $apos, ';' )"/>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:for-each select="row">
|
||||
<xsl:if test="comment">
|
||||
<xsl:text>COMMENT ON COLUMN `</xsl:text>
|
||||
<xsl:value-of select="$table" />
|
||||
<xsl:text>`.`</xsl:text>
|
||||
<xsl:value-of select="@name" />
|
||||
<xsl:text>` IS '</xsl:text>
|
||||
<xsl:value-of select="concat( $crlf, 'COMMENT ON COLUMN ' )"/>
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="$table" />
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat( '.', '' )"/>
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="@name" />
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat( substring( $padding_name, 1, string-length( $padding_name ) - string-length( @name ) )
|
||||
, 'IS ', $apos )"/>
|
||||
<xsl:call-template name="replace-substring">
|
||||
<xsl:with-param name="value" select="comment" />
|
||||
<xsl:with-param name="from" select='"'"' />
|
||||
<xsl:with-param name="to" select='"''"' />
|
||||
</xsl:call-template>
|
||||
<xsl:text>';
|
||||
</xsl:text>
|
||||
<xsl:value-of select="concat( $apos, ';' )"/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
|
||||
<xsl:if test="0 < count( row[@autoincrement = 1] )">
|
||||
<xsl:value-of select="concat( $crlf, '' )"/>
|
||||
<!-- create auto increment sequence -->
|
||||
<xsl:for-each select="row[@autoincrement = 1]">
|
||||
<xsl:value-of select="concat( $crlf, 'CREATE SEQUENCE ' )"/>
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="concat( 'SQ_', $table )" />
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat( ';', '' )"/>
|
||||
</xsl:for-each>
|
||||
|
||||
<!-- create auto increment trigger -->
|
||||
<xsl:value-of select="concat( $crlf, '' )"/>
|
||||
<xsl:value-of select="concat( $crlf, 'CREATE OR REPLACE TRIGGER ' )"/>
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="concat( 'TG_', $table, '_BI' )" />
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat( $crlf, ' BEFORE INSERT ON ' )"/>
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="$table" />
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat( $crlf, ' FOR EACH ROW' )"/>
|
||||
<xsl:value-of select="concat( $crlf, 'BEGIN' )"/>
|
||||
<xsl:for-each select="row[@autoincrement = 1]">
|
||||
<xsl:value-of select="concat( $crlf, ' if :NEW.' )"/>
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="@name" />
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat( ' is NULL then', '' )"/>
|
||||
<xsl:value-of select="concat( $crlf, ' :NEW.' )"/>
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="@name" />
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat( ' := ', '' )"/>
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="concat( 'SQ_', $table )" />
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat( '.nextVal;', '' )"/>
|
||||
<xsl:value-of select="concat( $crlf, ' end if;' )"/>
|
||||
</xsl:for-each>
|
||||
<xsl:value-of select="concat( $crlf, 'END;' )"/>
|
||||
<xsl:value-of select="concat( $crlf, '/' )"/>
|
||||
<xsl:value-of select="concat( $crlf, '' )"/>
|
||||
<xsl:value-of select="concat( $crlf, 'SHOW ERRORS;' )"/>
|
||||
</xsl:if>
|
||||
|
||||
</xsl:for-each>
|
||||
|
||||
<!-- fk -->
|
||||
<xsl:for-each select="table">
|
||||
<!-- Generate all FKs in the end - when all tables are present -->
|
||||
<xsl:if test="0 < count( table/row/relation )">
|
||||
<xsl:value-of select="concat( $crlf, '' )" />
|
||||
<xsl:value-of select="concat( $crlf, '-------------------------------------------------------------------------------' )" />
|
||||
<xsl:value-of select="concat( $crlf, '' )" />
|
||||
</xsl:if>
|
||||
<xsl:for-each select="table/row/relation/../.."> <!-- loop through tables which have relations -->
|
||||
<xsl:variable name="tbl_fr" select="@name" />
|
||||
<!-- This is a straight-forward algorithm: each <relation> produces one ALTER TABLE statement -->
|
||||
<xsl:for-each select="row">
|
||||
<xsl:for-each select="relation">
|
||||
<xsl:text>ALTER TABLE `</xsl:text>
|
||||
<xsl:value-of select="../../@name" />
|
||||
<xsl:text>` ADD FOREIGN KEY (</xsl:text>
|
||||
<xsl:value-of select="../@name" />
|
||||
<xsl:text>) REFERENCES `</xsl:text>
|
||||
<xsl:value-of select="@table" />
|
||||
<xsl:text>` (`</xsl:text>
|
||||
<xsl:value-of select="@row" />
|
||||
<xsl:text>`);
|
||||
</xsl:text>
|
||||
<xsl:variable name="tbl_to" select="@table" />
|
||||
<xsl:value-of select="concat( $crlf, 'ALTER TABLE ' )"/>
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="$tbl_fr" />
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat( ' ADD CONSTRAINT ', '' )"/>
|
||||
<xsl:call-template name="ora_fk_constraint_name">
|
||||
<xsl:with-param name="tbl_fr" select="$tbl_fr" />
|
||||
<xsl:with-param name="tbl_to" select="$tbl_to" />
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat( ' FOREIGN KEY ( ', '' )"/>
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="../@name" />
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat( ' ) REFERENCES ', '' )"/>
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="$tbl_to" />
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat( ' ( ', '' )"/>
|
||||
<xsl:call-template name="ora_ident">
|
||||
<xsl:with-param name="ident" select="@row" />
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat( ' );', '' )"/>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
<!-- @TODO: While it seems that XML DB model would contain several <relation>-s for FK constraints which use compound keys: one <relation> per column -->
|
||||
</xsl:for-each>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
@@ -37,5 +37,7 @@
|
||||
<type label="Inet Host Addr" length="0" sql="INET" quote="'" />
|
||||
<type label="Inet CIDR Addr" length="0" sql="CIDR" quote="'" />
|
||||
<type label="Geometry" length="0" sql="GEOMETRY" quote="'" />
|
||||
<type label="JSON" length="0" sql="JSON" quote="'" />
|
||||
<type label="JSONB" length="0" sql="JSONB" quote="'" />
|
||||
</group>
|
||||
</datatypes>
|
||||
|
||||
@@ -26,40 +26,40 @@
|
||||
|
||||
<!-- tables -->
|
||||
<xsl:for-each select="table">
|
||||
<xsl:text>CREATE TABLE "</xsl:text>
|
||||
<xsl:text>CREATE TABLE </xsl:text>
|
||||
<xsl:value-of select="@name" />
|
||||
<xsl:text>" (
|
||||
<xsl:text> (
|
||||
</xsl:text>
|
||||
<xsl:for-each select="row">
|
||||
<xsl:text>"</xsl:text>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name" />
|
||||
<xsl:text>" </xsl:text>
|
||||
<xsl:text> </xsl:text>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="@autoincrement = 1">
|
||||
<!-- use postgresql SERIAL shortcut for columns marked as
|
||||
<!-- use postgresql BIGSERIAL shortcut for columns marked as
|
||||
auto-increment. this creates integer column,
|
||||
corresponding sequence, and default expression for the
|
||||
column with nextval(). see:
|
||||
http://www.postgresql.org/docs/current/static/datatype-numeric.html#DATATYPE-SERIAL
|
||||
-->
|
||||
<xsl:text> SERIAL</xsl:text>
|
||||
<xsl:text>BIGSERIAL</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="datatype" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:text></xsl:text>
|
||||
|
||||
<xsl:if test="@null = 0">
|
||||
<xsl:text>NOT NULL </xsl:text>
|
||||
<xsl:text> NOT NULL</xsl:text>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="default">
|
||||
<xsl:if test=" default != 'NULL' ">
|
||||
<xsl:text>DEFAULT </xsl:text>
|
||||
<xsl:text> DEFAULT </xsl:text>
|
||||
<xsl:value-of select="default" />
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
|
||||
@@ -75,10 +75,21 @@
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
|
||||
<xsl:text>
|
||||
);
|
||||
</xsl:text>
|
||||
<xsl:text>
|
||||
|
||||
</xsl:text>
|
||||
<!-- keys -->
|
||||
<xsl:for-each select="key">
|
||||
<xsl:text>,
|
||||
</xsl:text>
|
||||
<xsl:text>ALTER TABLE </xsl:text>
|
||||
<xsl:text></xsl:text>
|
||||
<xsl:value-of select="../@name" />
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:text>ADD CONSTRAINT </xsl:text>
|
||||
<xsl:value-of select="../@name" />
|
||||
<xsl:text>_pkey </xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type = 'PRIMARY'">PRIMARY KEY (</xsl:when>
|
||||
<xsl:when test="@type = 'UNIQUE'">UNIQUE (</xsl:when>
|
||||
@@ -86,19 +97,16 @@
|
||||
</xsl:choose>
|
||||
|
||||
<xsl:for-each select="part">
|
||||
<xsl:text>"</xsl:text><xsl:value-of select="." /><xsl:text>"</xsl:text>
|
||||
<xsl:text></xsl:text><xsl:value-of select="." /><xsl:text></xsl:text>
|
||||
<xsl:if test="not (position() = last())">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:text>)</xsl:text>
|
||||
<xsl:text>);
|
||||
</xsl:text>
|
||||
|
||||
</xsl:for-each>
|
||||
|
||||
<xsl:text>
|
||||
);
|
||||
</xsl:text>
|
||||
|
||||
<xsl:if test="comment">
|
||||
<xsl:text>COMMENT ON TABLE "</xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
@@ -134,23 +142,29 @@
|
||||
</xsl:text>
|
||||
</xsl:for-each>
|
||||
|
||||
<!-- fk -->
|
||||
<xsl:for-each select="table">
|
||||
<xsl:for-each select="row">
|
||||
<xsl:for-each select="relation">
|
||||
<xsl:text>ALTER TABLE "</xsl:text>
|
||||
<xsl:value-of select="../../@name" />
|
||||
<xsl:text>" ADD FOREIGN KEY ("</xsl:text>
|
||||
<xsl:value-of select="../@name" />
|
||||
<xsl:text>") REFERENCES "</xsl:text>
|
||||
<xsl:value-of select="@table" />
|
||||
<xsl:text>" ("</xsl:text>
|
||||
<xsl:value-of select="@row" />
|
||||
<xsl:text>");
|
||||
<!-- tables -->
|
||||
<xsl:for-each select="table">
|
||||
<!-- fk -->
|
||||
<xsl:for-each select="row">
|
||||
<xsl:for-each select="relation">
|
||||
<xsl:text>ALTER TABLE </xsl:text>
|
||||
<xsl:value-of select="../../@name" />
|
||||
<xsl:text> ADD CONSTRAINT </xsl:text>
|
||||
<xsl:value-of select="../../@name" />
|
||||
<xsl:text>_</xsl:text>
|
||||
<xsl:value-of select="../@name" />
|
||||
<xsl:text>_fkey</xsl:text>
|
||||
<xsl:text> FOREIGN KEY (</xsl:text>
|
||||
<xsl:value-of select="../@name" />
|
||||
<xsl:text>) REFERENCES </xsl:text>
|
||||
<xsl:value-of select="@table" />
|
||||
<xsl:text>(</xsl:text>
|
||||
<xsl:value-of select="@row" />
|
||||
<xsl:text>);
|
||||
</xsl:text>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
@@ -58,14 +58,10 @@
|
||||
|
||||
<!-- keys after table -->
|
||||
<xsl:for-each select="key">
|
||||
<xsl:if test="@type = 'UNIQUE' or (@type = 'PRIMARY' and count(child::part) > 1)">
|
||||
<xsl:if test="@type = 'UNIQUE' or (@type = 'PRIMARY' and count(child::part) > 1)">
|
||||
<xsl:text>,
|
||||
</xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type = 'PRIMARY'">PRIMARY KEY</xsl:when>
|
||||
<xsl:when test="@type = 'UNIQUE'">UNIQUE</xsl:when>
|
||||
</xsl:choose>
|
||||
<xsl:text> (</xsl:text>
|
||||
<xsl:text>UNIQUE (</xsl:text>
|
||||
|
||||
<xsl:for-each select="part">
|
||||
<xsl:value-of select="." />
|
||||
|
||||
|
After Width: | Height: | Size: 353 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 128 B |
|
After Width: | Height: | Size: 239 B |
|
After Width: | Height: | Size: 247 B |
|
After Width: | Height: | Size: 115 B |
|
After Width: | Height: | Size: 118 B |
@@ -1,245 +1,321 @@
|
||||
<!doctype html>
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
WWW SQL Designer, (C) 2005-2015 Ondrej Zara, ondras@zarovi.cz
|
||||
Version: 2.7
|
||||
See license.txt for licencing information.
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>WWW SQL Designer</title>
|
||||
<meta name="viewport" content="initial-scale=1,maximum-scale=1" />
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="styles/style.css" media="all" />
|
||||
<link rel="stylesheet" href="styles/print.css" type="text/css" media="print" />
|
||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/dropbox.js/0.10.2/dropbox.min.js"></script>
|
||||
|
||||
<script src="js/oz.js"></script>
|
||||
<script src="js/config.js"></script>
|
||||
<script src="js/globals.js"></script>
|
||||
<script src="js/visual.js"></script>
|
||||
<script src="js/row.js"></script>
|
||||
<script src="js/table.js"></script>
|
||||
<script src="js/relation.js"></script>
|
||||
<script src="js/key.js"></script>
|
||||
<script src="js/rubberband.js"></script>
|
||||
<script src="js/map.js"></script>
|
||||
<script src="js/toggle.js"></script>
|
||||
<script src="js/io.js"></script>
|
||||
<script src="js/storage.js"></script>
|
||||
<script src="js/storage.browser.js"></script>
|
||||
<script src="js/storage.clipboard.js"></script>
|
||||
<script src="js/storage.rest.js"></script>
|
||||
<script src="js/storage.dropbox.js"></script>
|
||||
<script src="js/tablemanager.js"></script>
|
||||
<script src="js/rowmanager.js"></script>
|
||||
<script src="js/keymanager.js"></script>
|
||||
<script src="js/window.js"></script>
|
||||
<script src="js/options.js"></script>
|
||||
<script src="js/wwwsqldesigner.js"></script>
|
||||
<head>
|
||||
<title>WWW SQL Designer</title>
|
||||
<meta name="viewport" content="initial-scale=1,maximum-scale=1" />
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" title="material-inspired" href="styles/material-inspired.css" media="all" />
|
||||
<link rel="alternate stylesheet" title="original" href="styles/original.css" media="all" />
|
||||
<!--[if IE 6
|
||||
]><link rel="stylesheet" type="text/css" href="styles/ie6.css"
|
||||
/><![endif]-->
|
||||
<!--[if IE 7
|
||||
]><link rel="stylesheet" type="text/css" href="styles/ie7.css"
|
||||
/><![endif]-->
|
||||
<link rel="stylesheet" href="styles/print.css" type="text/css" media="print" />
|
||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/dropbox.js/0.10.2/dropbox.min.js"></script>
|
||||
|
||||
<script src="js/oz.js"></script>
|
||||
<script src="js/config.js"></script>
|
||||
<script src="js/globals.js"></script>
|
||||
<script src="js/visual.js"></script>
|
||||
<script src="js/row.js"></script>
|
||||
<script src="js/table.js"></script>
|
||||
<script src="js/relation.js"></script>
|
||||
<script src="js/key.js"></script>
|
||||
<script src="js/rubberband.js"></script>
|
||||
<script src="js/map.js"></script>
|
||||
<script src="js/toggle.js"></script>
|
||||
<script src="js/io.js"></script>
|
||||
<script src="js/tablemanager.js"></script>
|
||||
<script src="js/rowmanager.js"></script>
|
||||
<script src="js/keymanager.js"></script>
|
||||
<script src="js/window.js"></script>
|
||||
<script src="js/options.js"></script>
|
||||
<script src="js/wwwsqldesigner.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="area"></div>
|
||||
<div id="area"></div>
|
||||
|
||||
<div id="controls">
|
||||
<div id="bar">
|
||||
<div id="toggle"></div>
|
||||
<button id="saveload"></button>
|
||||
<div id="controls">
|
||||
<div id="bar">
|
||||
<div id="toggle"></div>
|
||||
<input type="button" id="saveload" />
|
||||
|
||||
<hr/>
|
||||
<hr />
|
||||
|
||||
<input type="button" id="addtable" />
|
||||
<input type="button" id="edittable" />
|
||||
<input type="button" id="tablekeys" />
|
||||
<input type="button" id="removetable" />
|
||||
<input type="button" id="aligntables" />
|
||||
<input type="button" id="cleartables" />
|
||||
<input type="button" id="addtable" />
|
||||
<input type="button" id="edittable" />
|
||||
<input type="button" id="tablekeys" />
|
||||
<input type="button" id="removetable" />
|
||||
<input type="button" id="aligntables" />
|
||||
<input type="button" id="cleartables" />
|
||||
|
||||
<hr/>
|
||||
<hr />
|
||||
|
||||
<input type="button" id="addrow" />
|
||||
<input type="button" id="editrow" />
|
||||
<input type="button" id="uprow" class="small" /><input type="button" id="downrow" class="small"/>
|
||||
<input type="button" id="foreigncreate" />
|
||||
<input type="button" id="foreignconnect" />
|
||||
<input type="button" id="foreigndisconnect" />
|
||||
<input type="button" id="removerow" />
|
||||
<input type="button" id="addrow" />
|
||||
<input type="button" id="editrow" />
|
||||
<input type="button" id="uprow" class="small" /><input type="button" id="downrow" class="small" />
|
||||
<input type="button" id="foreigncreate" />
|
||||
<input type="button" id="foreignconnect" />
|
||||
<input type="button" id="foreigndisconnect" />
|
||||
<input type="button" id="removerow" />
|
||||
|
||||
<hr/>
|
||||
<hr />
|
||||
|
||||
<input type="button" id="options" />
|
||||
<a href="https://github.com/ondras/wwwsqldesigner/wiki" target="_blank"><input type="button" id="docs" value="" /></a>
|
||||
</div>
|
||||
<input type="button" id="options" />
|
||||
<a href="https://github.com/ondras/wwwsqldesigner/wiki" target="_blank"><input type="button" id="docs"
|
||||
value="" /></a>
|
||||
</div>
|
||||
|
||||
<div id="rubberband"></div>
|
||||
<div id="rubberband"></div>
|
||||
|
||||
<div id="minimap"></div>
|
||||
<div id="minimap"></div>
|
||||
|
||||
<div id="background"></div>
|
||||
<div id="background"></div>
|
||||
|
||||
<div id="window">
|
||||
<div id="windowtitle"><img id="throbber" src="images/throbber.gif" alt="" title=""/></div>
|
||||
<div id="windowcontent"></div>
|
||||
<input type="button" id="windowok" />
|
||||
<input type="button" id="windowcancel" />
|
||||
</div>
|
||||
</div> <!-- #controls -->
|
||||
<div id="window">
|
||||
<div id="windowtitle">
|
||||
<img id="throbber" src="images/throbber.gif" alt="" title="" />
|
||||
</div>
|
||||
<div id="windowcontent"></div>
|
||||
<input type="button" id="windowok" />
|
||||
<input type="button" id="windowcancel" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- #controls -->
|
||||
|
||||
<div id="opts">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
* <label id="language" for="optionlocale"></label>
|
||||
</td>
|
||||
<td>
|
||||
<select id="optionlocale"><option></option></select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
* <label id="db" for="optiondb"></label>
|
||||
</td>
|
||||
<td>
|
||||
<select id="optiondb"><option></option></select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label id="snap" for="optionsnap"></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" size="4" id="optionsnap" />
|
||||
<span class="small" id="optionsnapnotice"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label id="pattern" for="optionpattern"></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" size="6" id="optionpattern" />
|
||||
<span class="small" id="optionpatternnotice"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label id="hide" for="optionhide"></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="optionhide" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
* <label id="vector" for="optionvector"></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="optionvector" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
* <label id="showsize" for="optionshowsize"></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="optionshowsize" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
* <label id="showtype" for="optionshowtype"></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="optionshowtype" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="opts">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>* <label id="language" for="optionlocale"></label></td>
|
||||
<td>
|
||||
<select id="optionlocale">
|
||||
<option></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>* <label id="db" for="optiondb"></label></td>
|
||||
<td>
|
||||
<select id="optiondb">
|
||||
<option></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label id="snap" for="optionsnap"></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" size="4" id="optionsnap" />
|
||||
<span class="small" id="optionsnapnotice"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label id="pattern" for="optionpattern"></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" size="6" id="optionpattern" />
|
||||
<span class="small" id="optionpatternnotice"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>* <label id="style" for="optionstyle"></label></td>
|
||||
<td>
|
||||
<select id="optionstyle">
|
||||
<option></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label id="hide" for="optionhide"></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="optionhide" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>* <label id="vector" for="optionvector"></label></td>
|
||||
<td>
|
||||
<input type="checkbox" id="optionvector" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>* <label id="showsize" for="optionshowsize"></label></td>
|
||||
<td>
|
||||
<input type="checkbox" id="optionshowsize" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>* <label id="showtype" for="optionshowtype"></label></td>
|
||||
<td>
|
||||
<input type="checkbox" id="optionshowtype" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<hr />
|
||||
<hr />
|
||||
|
||||
* <span class="small" id="optionsnotice"></span>
|
||||
</div>
|
||||
* <span class="small" id="optionsnotice"></span>
|
||||
</div>
|
||||
|
||||
<div id="io">
|
||||
<span id="storage"></span>: <select></select>
|
||||
<div id="io-content"></div>
|
||||
<hr/>
|
||||
<button id="quicksave"></button>
|
||||
<button id="clientsql"></button>
|
||||
<textarea id="textarea" rows="1" cols="1"></textarea>
|
||||
</div>
|
||||
<div id="io">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 60%">
|
||||
<fieldset>
|
||||
<legend id="client"></legend>
|
||||
<div id="singlerow">
|
||||
<input type="button" id="clientsave" />
|
||||
<input type="button" id="clientload" />
|
||||
</div>
|
||||
<div id="singlerow">
|
||||
<input type="button" id="clientdownloadxml" />
|
||||
<input type="button" id="clientdownloadtxt" />
|
||||
<input type="button" id="clientloadfromfile" />
|
||||
</div>
|
||||
<div id="singlerow">
|
||||
<input type="button" id="clientlocalsave" />
|
||||
<input type="button" id="clientlocalload" />
|
||||
<input type="button" id="clientlocallist" />
|
||||
</div>
|
||||
<div id="singlerow">
|
||||
<input type="button" id="dropboxsave" /><!-- may get hidden by dropBoxInit() -->
|
||||
<input type="button" id="dropboxload" /><!-- may get hidden by dropBoxInit() -->
|
||||
<input type="button" id="dropboxlist" /><!-- may get hidden by dropBoxInit() -->
|
||||
</div>
|
||||
<div id="singlerow">
|
||||
<input type="button" id="clientcopy" />
|
||||
<input type="button" id ="clientpaste" />
|
||||
</div>
|
||||
<hr />
|
||||
<input type="button" id="clientsql" />
|
||||
</fieldset>
|
||||
</td>
|
||||
<td style="width: 40%">
|
||||
<fieldset>
|
||||
<legend id="server"></legend>
|
||||
<label for="backend" id="backendlabel"></label>
|
||||
<select id="backend">
|
||||
<option></option>
|
||||
</select>
|
||||
<hr />
|
||||
<input type="button" id="serversave" />
|
||||
<input type="button" id="quicksave" />
|
||||
<input type="button" id="serverload" />
|
||||
<input type="button" id="serverlist" />
|
||||
<input type="button" id="serverimport" />
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<fieldset>
|
||||
<legend id="output"></legend>
|
||||
<textarea id="textarea" rows="1" cols="1"></textarea>
|
||||
<!--modified by javascript later-->
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="keys">
|
||||
<fieldset>
|
||||
<legend id="keyslistlabel"></legend>
|
||||
<select id="keyslist"><option></option></select>
|
||||
<input type="button" id="keyadd" />
|
||||
<input type="button" id="keyremove" />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend id="keyedit"></legend>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="keytype" id="keytypelabel"></label>
|
||||
<select id="keytype"><option></option></select>
|
||||
</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<label for="keyname" id="keynamelabel"></label>
|
||||
<input type="text" id="keyname" size="10" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"><hr/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="keyfields" id="keyfieldslabel"></label><br/>
|
||||
<select id="keyfields" size="5" multiple="multiple"><option></option></select>
|
||||
</td>
|
||||
<td>
|
||||
<input type="button" id="keyleft" value="<<" /><br/>
|
||||
<input type="button" id="keyright" value=">>" /><br/>
|
||||
</td>
|
||||
<td>
|
||||
<label for="keyavail" id="keyavaillabel"></label><br/>
|
||||
<select id="keyavail" size="5" multiple="multiple"><option></option></select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div id="keys">
|
||||
<fieldset>
|
||||
<legend id="keyslistlabel"></legend>
|
||||
<select id="keyslist">
|
||||
<option></option>
|
||||
</select>
|
||||
<input type="button" id="keyadd" />
|
||||
<input type="button" id="keyremove" />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend id="keyedit"></legend>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="keytype" id="keytypelabel"></label>
|
||||
<select id="keytype">
|
||||
<option></option>
|
||||
</select>
|
||||
</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<label for="keyname" id="keynamelabel"></label>
|
||||
<input type="text" id="keyname" size="10" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<hr />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="keyfields" id="keyfieldslabel"></label><br />
|
||||
<select id="keyfields" size="5" multiple="multiple">
|
||||
<option></option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input type="button" id="keyleft" value="<<" /><br />
|
||||
<input type="button" id="keyright" value=">>" /><br />
|
||||
</td>
|
||||
<td>
|
||||
<label for="keyavail" id="keyavaillabel"></label><br />
|
||||
<select id="keyavail" size="5" multiple="multiple">
|
||||
<option></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="table">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<label id="tablenamelabel" for="tablename"></label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="tablename" type="text" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label id="tablecommentlabel" for="tablecomment"></label>
|
||||
</td>
|
||||
<td>
|
||||
<textarea rows="5" cols="40" id="tablecomment"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="table">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<label id="tablenamelabel" for="tablename"></label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="tablename" type="text" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label id="tablecommentlabel" for="tablecomment"></label>
|
||||
</td>
|
||||
<td>
|
||||
<textarea rows="5" cols="40" id="tablecomment"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var d = new SQL.Designer();
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var d = new SQL.Designer();
|
||||
// d.setXhrHeaders({"Authorization": "Bearer xxx"});
|
||||
// d.setXhrHeaders({"X-CSRF-TOKEN": "xxx"});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,29 +1,99 @@
|
||||
var CONFIG = {
|
||||
AVAILABLE_DBS: ["mysql", "sqlite", "web2py", "mssql", "postgresql", "oracle", "sqlalchemy", "vfp9", "cubrid"],
|
||||
DEFAULT_DB: "mysql",
|
||||
AVAILABLE_DBS: [
|
||||
"mysql",
|
||||
"sqlite",
|
||||
"web2py",
|
||||
"mssql",
|
||||
"postgresql",
|
||||
"oracle",
|
||||
"sqlalchemy",
|
||||
"vfp9",
|
||||
"cubrid",
|
||||
"web2py",
|
||||
],
|
||||
DEFAULT_DB: "mysql",
|
||||
|
||||
AVAILABLE_LOCALES: ["ar", "cs", "de", "el", "en", "eo", "es", "fr", "hu", "it", "ja", "nl", "pl", "pt_BR", "ro", "ru", "sv", "zh"],
|
||||
DEFAULT_LOCALE: "en",
|
||||
AVAILABLE_LOCALES: [
|
||||
"ar",
|
||||
"cs",
|
||||
"de",
|
||||
"el",
|
||||
"en",
|
||||
"eo",
|
||||
"es",
|
||||
"fr",
|
||||
"hu",
|
||||
"it",
|
||||
"ja",
|
||||
"ko",
|
||||
"nl",
|
||||
"pl",
|
||||
"pt_BR",
|
||||
"ro",
|
||||
"ru",
|
||||
"sv",
|
||||
"tr",
|
||||
"uk",
|
||||
"zh",
|
||||
],
|
||||
DEFAULT_LOCALE: "en",
|
||||
|
||||
AVAILABLE_BACKENDS: ["php-mysql", "php-blank", "php-file", "php-sqlite", "php-mysql+file", "php-postgresql", "php-pdo", "perl-file", "php-cubrid", "asp-file"],
|
||||
DEFAULT_BACKEND: ["php-mysql"],
|
||||
AVAILABLE_BACKENDS: [
|
||||
"php-mysql",
|
||||
"php-s3",
|
||||
"php-blank",
|
||||
"php-file",
|
||||
"php-sqlite",
|
||||
"php-mysql+file",
|
||||
"php-postgresql",
|
||||
"php-pdo",
|
||||
"perl-file",
|
||||
"php-cubrid",
|
||||
"asp-file",
|
||||
"web2py",
|
||||
],
|
||||
DEFAULT_BACKEND: ["php-mysql"],
|
||||
|
||||
RELATION_THICKNESS: 2,
|
||||
RELATION_SPACING: 15,
|
||||
RELATION_COLORS: ["#000", "#800", "#080", "#008", "#088", "#808", "#088"],
|
||||
RELATION_THICKNESS: 2,
|
||||
RELATION_SPACING: 15,
|
||||
RELATION_COLORS: ["#000", "#800", "#080", "#008", "#088", "#808", "#088"],
|
||||
|
||||
STATIC_PATH: "",
|
||||
XHR_PATH: "",
|
||||
RELATION_HIGHLIGHTED_COLOR: "#FF0000",
|
||||
RELATION_HIGHLIGHTED_THICKNESS: 5,
|
||||
|
||||
/*
|
||||
* The key below needs to be set individually by you if you want to use the Dropbox load/save feature.
|
||||
* To do that, first sign up with Dropbox (may require a specific developer / SDK sign-up), go to
|
||||
* https://www.dropbox.com/developers/apps and use "Create app" to add a new "Dropbox API app".
|
||||
* Limit the app to its own folder. Call it, for instance, "wwwsqldesigner".
|
||||
* Under "OAuth 2", "Redirect URIs", add the URL to the "dropbox-oauth-receiver.html" file on your server.
|
||||
* E.g, if you install wwwsqldesigner on your local web server under "http://localhost/sqldesigner/", then add
|
||||
* http://localhost/sqldesigner/dropbox-oauth-receiver.html as a Redirection URI.
|
||||
* Copy the shown "App key" and paste it here below instead of the null value:
|
||||
*/
|
||||
DROPBOX_KEY: null // such as: "d6stdscwewhl6sa"
|
||||
}
|
||||
STYLES: ["material-inspired", "original"],
|
||||
MATERIAL_RELATION_COLORS: [
|
||||
"#323232",
|
||||
"#F44336",
|
||||
"#E91E63",
|
||||
"#9C27B0",
|
||||
"#3F51B5",
|
||||
"#673AB7",
|
||||
"#2196F3",
|
||||
"#03A9F4",
|
||||
"#00BCD4",
|
||||
"#009688",
|
||||
"#4CAF50",
|
||||
"#8BC34A",
|
||||
"#CDDC39",
|
||||
"#FFC107",
|
||||
"#FF5722",
|
||||
"#795548",
|
||||
"#607D8B",
|
||||
],
|
||||
|
||||
STATIC_PATH: "",
|
||||
XHR_PATH: "",
|
||||
|
||||
/*
|
||||
* The key below needs to be set individually by you if you want to use the Dropbox load/save feature.
|
||||
* To do that, first sign up with Dropbox (may require a specific developer / SDK sign-up), go to
|
||||
* https://www.dropbox.com/developers/apps and use "Create app" to add a new "Dropbox API app".
|
||||
* Limit the app to its own folder. Call it, for instance, "wwwsqldesigner".
|
||||
* Under "OAuth 2", "Redirect URIs", add the URL to the "dropbox-oauth-receiver.html" file on your server.
|
||||
* E.g, if you install wwwsqldesigner on your local web server under "http://localhost/sqldesigner/", then add
|
||||
* http://localhost/sqldesigner/dropbox-oauth-receiver.html as a Redirection URI.
|
||||
* Copy the shown "App key" and paste it here below instead of the null value:
|
||||
*/
|
||||
DROPBOX_KEY: null, // such as: "d6stdscwewhl6sa"
|
||||
};
|
||||
|
||||
@@ -1,65 +1,83 @@
|
||||
function _(str) { /* getText */
|
||||
if (!(str in window.LOCALE)) { return str; }
|
||||
return window.LOCALE[str];
|
||||
function _(str) {
|
||||
/* getText */
|
||||
if (!(str in window.LOCALE)) {
|
||||
return str;
|
||||
}
|
||||
return window.LOCALE[str];
|
||||
}
|
||||
|
||||
if (typeof String.prototype.endsWith !== 'function') {
|
||||
String.prototype.endsWith = function(suffix) {
|
||||
return this.indexOf(suffix, this.length - suffix.length) !== -1;
|
||||
};
|
||||
if (typeof String.prototype.endsWith !== "function") {
|
||||
String.prototype.endsWith = function (suffix) {
|
||||
return this.indexOf(suffix, this.length - suffix.length) !== -1;
|
||||
};
|
||||
}
|
||||
|
||||
if (!String.prototype.trim) {
|
||||
String.prototype.trim = function() {
|
||||
return this.match(/^\s*([\s\S]*?)\s*$/)[1];
|
||||
}
|
||||
String.prototype.trim = function () {
|
||||
return this.match(/^\s*([\s\S]*?)\s*$/)[1];
|
||||
};
|
||||
}
|
||||
|
||||
if (!String.trim) {
|
||||
String.trim = function(obj) { return String.prototype.trim.call(obj);}
|
||||
String.trim = function (obj) {
|
||||
return String.prototype.trim.call(obj);
|
||||
};
|
||||
}
|
||||
|
||||
if (!Object.create) {
|
||||
Object.create = function (o) {
|
||||
if (arguments.length > 1) { throw new Error("Object.create polyfill only accepts the first parameter"); }
|
||||
var tmp = function() {};
|
||||
tmp.prototype = o;
|
||||
return new tmp();
|
||||
};
|
||||
Object.create = function (o) {
|
||||
if (arguments.length > 1) {
|
||||
throw new Error(
|
||||
"Object.create polyfill only accepts the first parameter"
|
||||
);
|
||||
}
|
||||
var tmp = function () {};
|
||||
tmp.prototype = o;
|
||||
return new tmp();
|
||||
};
|
||||
}
|
||||
|
||||
var DATATYPES = false;
|
||||
var LOCALE = {};
|
||||
var SQL = {
|
||||
_subscribers: {},
|
||||
_subscribers: {},
|
||||
|
||||
publish: function(message, publisher, data) {
|
||||
var subscribers = this._subscribers[message] || [];
|
||||
var obj = {
|
||||
target: publisher,
|
||||
data: data
|
||||
}
|
||||
subscribers.forEach(function(subscriber) { subscriber(obj); });
|
||||
},
|
||||
publish: function (message, publisher, data) {
|
||||
var subscribers = this._subscribers[message] || [];
|
||||
var obj = {
|
||||
target: publisher,
|
||||
data: data,
|
||||
};
|
||||
subscribers.forEach(function (subscriber) {
|
||||
subscriber(obj);
|
||||
});
|
||||
},
|
||||
|
||||
subscribe: function(message, subscriber) {
|
||||
if (!(message in this._subscribers)) {
|
||||
this._subscribers[message] = [];
|
||||
}
|
||||
var index = this._subscribers[message].indexOf(subscriber);
|
||||
if (index == -1) { this._subscribers[message].push(subscriber); }
|
||||
},
|
||||
subscribe: function (message, subscriber) {
|
||||
if (!(message in this._subscribers)) {
|
||||
this._subscribers[message] = [];
|
||||
}
|
||||
var index = this._subscribers[message].indexOf(subscriber);
|
||||
if (index == -1) {
|
||||
this._subscribers[message].push(subscriber);
|
||||
}
|
||||
},
|
||||
|
||||
unsubscribe: function(message, subscriber) {
|
||||
var index = this._subscribers[message].indexOf(subscriber);
|
||||
if (index > -1) { this._subscribers[message].splice(index, 1); }
|
||||
},
|
||||
unsubscribe: function (message, subscriber) {
|
||||
var index = this._subscribers[message].indexOf(subscriber);
|
||||
if (index > -1) {
|
||||
this._subscribers[message].splice(index, 1);
|
||||
}
|
||||
},
|
||||
|
||||
escape: function(str) {
|
||||
return str.replace(/&/g, "&").replace(/>/g, ">").replace(/</g, "<");
|
||||
}
|
||||
}
|
||||
escape: function (str) {
|
||||
return str
|
||||
.replace(/&/g, "&")
|
||||
.replace(/>/g, ">")
|
||||
.replace(/</g, "<");
|
||||
},
|
||||
};
|
||||
|
||||
window.onbeforeunload = function(e) {
|
||||
return ""; /* some browsers will show this text, some won't. */
|
||||
}
|
||||
window.onbeforeunload = function (e) {
|
||||
return ""; /* some browsers will show this text, some won't. */
|
||||
};
|
||||
|
||||
@@ -1,162 +1,692 @@
|
||||
SQL.IO = function(owner) {
|
||||
this.owner = owner;
|
||||
this._storages = [];
|
||||
this._currentStorage = null;
|
||||
SQL.IO = function (owner) {
|
||||
this.owner = owner;
|
||||
this._name = ""; /* last used name with server load/save */
|
||||
this.lastUsedName =
|
||||
""; /* last used name with local storage or dropbox load/save */
|
||||
this.dom = {
|
||||
container: OZ.$("io"),
|
||||
};
|
||||
|
||||
this.dom = {
|
||||
container: OZ.$("io"),
|
||||
content: OZ.$("io-content"),
|
||||
seelct: null
|
||||
};
|
||||
var ids = [
|
||||
"saveload",
|
||||
"clientlocalsave",
|
||||
"clientsave",
|
||||
"clientlocalload",
|
||||
"clientlocallist",
|
||||
"clientload",
|
||||
"clientsql",
|
||||
"dropboxsave",
|
||||
"dropboxload",
|
||||
"dropboxlist",
|
||||
"quicksave",
|
||||
"serversave",
|
||||
"serverload",
|
||||
"serverlist",
|
||||
"clientcopy",
|
||||
"clientpaste",
|
||||
"clientdownloadxml",
|
||||
"clientdownloadtxt",
|
||||
"clientloadfromfile",
|
||||
"serverimport",
|
||||
];
|
||||
for (var i = 0; i < ids.length; i++) {
|
||||
var id = ids[i];
|
||||
var elm = OZ.$(id);
|
||||
this.dom[id] = elm;
|
||||
elm.value = _(id);
|
||||
}
|
||||
|
||||
this.dom.select = this.dom.container.querySelector("select");
|
||||
this.dom.ta = OZ.$("textarea");
|
||||
this.dom.quicksave.value += " (F2)";
|
||||
|
||||
var ids = ["saveload", "storage", "quicksave", "clientsql"];
|
||||
for (var i=0;i<ids.length;i++) {
|
||||
var id = ids[i];
|
||||
var elm = OZ.$(id);
|
||||
this.dom[id] = elm;
|
||||
elm.innerHTML = _(id);
|
||||
}
|
||||
this.dom.quicksave.innerHTML += " (F2)";
|
||||
var ids = ["client", "server", "output", "backendlabel"];
|
||||
for (var i = 0; i < ids.length; i++) {
|
||||
var id = ids[i];
|
||||
var elm = OZ.$(id);
|
||||
elm.innerHTML = _(id);
|
||||
}
|
||||
|
||||
this.dom.container.parentNode.removeChild(this.dom.container);
|
||||
this.dom.ta = OZ.$("textarea");
|
||||
this.dom.backend = OZ.$("backend");
|
||||
|
||||
OZ.Event.add(this.dom.saveload, "click", this.click.bind(this));
|
||||
OZ.Event.add(this.dom.clientsql, "click", this._clientsql.bind(this));
|
||||
OZ.Event.add(this.dom.quicksave, "click", this._quicksave.bind(this));
|
||||
OZ.Event.add(this.dom.select, "change", this._storageChange.bind(this));
|
||||
OZ.Event.add(window, "keydown", this._keydown.bind(this));
|
||||
this._build();
|
||||
}
|
||||
/* init dropbox before hiding the container so it can adjust its buttons */
|
||||
this.dropBoxInit();
|
||||
|
||||
SQL.IO.prototype._build = function() {
|
||||
var local = document.createElement("optgroup");
|
||||
local.label = "Local";
|
||||
this.dom.select.appendChild(local);
|
||||
this.dom.container.parentNode.removeChild(this.dom.container);
|
||||
this.dom.container.style.visibility = "";
|
||||
|
||||
var remote = document.createElement("optgroup");
|
||||
remote.label = "Remote";
|
||||
this.dom.select.appendChild(remote);
|
||||
this.saveresponse = this.saveresponse.bind(this);
|
||||
this.loadresponse = this.loadresponse.bind(this);
|
||||
this.listresponse = this.listresponse.bind(this);
|
||||
this.importresponse = this.importresponse.bind(this);
|
||||
|
||||
this._addStorage(SQL.Storage.Browser, local);
|
||||
this._addStorage(SQL.Storage.Clipboard, local);
|
||||
this._addStorage(SQL.Storage.REST, remote);
|
||||
this._addStorage(SQL.Storage.Dropbox, remote);
|
||||
OZ.Event.add(this.dom.saveload, "click", this.click.bind(this));
|
||||
OZ.Event.add(
|
||||
this.dom.clientlocalsave,
|
||||
"click",
|
||||
this.clientlocalsave.bind(this)
|
||||
);
|
||||
OZ.Event.add(this.dom.clientsave, "click", this.clientsave.bind(this));
|
||||
OZ.Event.add(
|
||||
this.dom.clientlocalload,
|
||||
"click",
|
||||
this.clientlocalload.bind(this)
|
||||
);
|
||||
OZ.Event.add(
|
||||
this.dom.clientlocallist,
|
||||
"click",
|
||||
this.clientlocallist.bind(this)
|
||||
);
|
||||
OZ.Event.add(this.dom.clientload, "click", this.clientload.bind(this));
|
||||
OZ.Event.add(this.dom.dropboxload, "click", this.dropboxload.bind(this));
|
||||
OZ.Event.add(this.dom.dropboxsave, "click", this.dropboxsave.bind(this));
|
||||
OZ.Event.add(this.dom.dropboxlist, "click", this.dropboxlist.bind(this));
|
||||
OZ.Event.add(this.dom.clientsql, "click", this.clientsql.bind(this));
|
||||
OZ.Event.add(this.dom.quicksave, "click", this.quicksave.bind(this));
|
||||
OZ.Event.add(this.dom.serversave, "click", this.serversave.bind(this));
|
||||
OZ.Event.add(this.dom.serverload, "click", this.serverload.bind(this));
|
||||
OZ.Event.add(this.dom.serverlist, "click", this.serverlist.bind(this));
|
||||
OZ.Event.add(this.dom.serverimport, "click", this.serverimport.bind(this));
|
||||
OZ.Event.add(this.dom.clientcopy, "click", this.clientcopy.bind(this));
|
||||
OZ.Event.add(this.dom.clientpaste, "click", this.clientpaste.bind(this));
|
||||
OZ.Event.add(this.dom.clientdownloadxml, "click", this.clientdownloadxml.bind(this));
|
||||
OZ.Event.add(this.dom.clientdownloadtxt, "click", this.clientdownloadtxt.bind(this));
|
||||
OZ.Event.add(this.dom.clientloadfromfile, "click", this.clientloadfromfile.bind(this));
|
||||
OZ.Event.add(document, "keydown", this.press.bind(this));
|
||||
this.build();
|
||||
};
|
||||
|
||||
this._setStorage(2);
|
||||
}
|
||||
SQL.IO.prototype.build = function () {
|
||||
OZ.DOM.clear(this.dom.backend);
|
||||
|
||||
SQL.IO.prototype.getArea = function() {
|
||||
return this.dom.ta;
|
||||
}
|
||||
var bs = CONFIG.AVAILABLE_BACKENDS;
|
||||
var be = CONFIG.DEFAULT_BACKEND;
|
||||
var r = window.location.search.substring(1).match(/backend=([^&]*)/);
|
||||
if (r) {
|
||||
req = r[1];
|
||||
if (bs.indexOf(req) != -1) {
|
||||
be = req;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < bs.length; i++) {
|
||||
var o = OZ.DOM.elm("option");
|
||||
o.value = bs[i];
|
||||
o.innerHTML = bs[i];
|
||||
this.dom.backend.appendChild(o);
|
||||
if (bs[i] == be) {
|
||||
this.dom.backend.selectedIndex = i;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
SQL.IO.prototype.click = function() { /* open io dialog */
|
||||
this.dom.ta.value = "";
|
||||
this.dom.clientsql.value = _("clientsql") + " (" + window.DATATYPES.getAttribute("db") + ")";
|
||||
this.owner.window.open(_("saveload"), this.dom.container);
|
||||
SQL.IO.prototype.click = function () {
|
||||
/* open io dialog */
|
||||
this.build();
|
||||
this.dom.ta.value = "";
|
||||
this.dom.clientsql.value =
|
||||
_("clientsql") + " (" + window.DATATYPES.getAttribute("db") + ")";
|
||||
this.owner.window.open(_("saveload"), this.dom.container);
|
||||
};
|
||||
|
||||
var index = this._storages.indexOf(this._currentStorage);
|
||||
this._setStorage(index);
|
||||
}
|
||||
SQL.IO.prototype.fromXMLText = function (xml) {
|
||||
try {
|
||||
if (window.DOMParser) {
|
||||
var parser = new DOMParser();
|
||||
var xmlDoc = parser.parseFromString(xml, "text/xml");
|
||||
} else if (window.ActiveXObject || "ActiveXObject" in window) {
|
||||
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
|
||||
xmlDoc.loadXML(xml);
|
||||
} else {
|
||||
throw new Error("No XML parser available.");
|
||||
}
|
||||
} catch (e) {
|
||||
alert(_("xmlerror") + ": " + e.message);
|
||||
return;
|
||||
}
|
||||
this.fromXML(xmlDoc);
|
||||
};
|
||||
|
||||
SQL.IO.prototype.fromXMLText = function(xml) {
|
||||
try {
|
||||
if (window.DOMParser) {
|
||||
var parser = new DOMParser();
|
||||
var xmlDoc = parser.parseFromString(xml, "text/xml");
|
||||
} else if (window.ActiveXObject || "ActiveXObject" in window) {
|
||||
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
|
||||
xmlDoc.loadXML(xml);
|
||||
} else {
|
||||
throw new Error("No XML parser available.");
|
||||
}
|
||||
} catch(e) {
|
||||
alert(_("xmlerror")+': '+e.message);
|
||||
return;
|
||||
}
|
||||
this.fromXML(xmlDoc);
|
||||
}
|
||||
SQL.IO.prototype.fromXML = function (xmlDoc) {
|
||||
if (!xmlDoc || !xmlDoc.documentElement) {
|
||||
alert(_("xmlerror") + ": Null document");
|
||||
return false;
|
||||
}
|
||||
this.owner.fromXML(xmlDoc.documentElement);
|
||||
this.owner.window.close();
|
||||
return true;
|
||||
};
|
||||
|
||||
SQL.IO.prototype.fromXML = function(xmlDoc) {
|
||||
if (!xmlDoc || !xmlDoc.documentElement) {
|
||||
alert(_("xmlerror")+': Null document');
|
||||
return false;
|
||||
}
|
||||
this.owner.fromXML(xmlDoc.documentElement);
|
||||
this.owner.window.close();
|
||||
return true;
|
||||
}
|
||||
SQL.IO.prototype.clientsave = function () {
|
||||
var xml = this.owner.toXML();
|
||||
this.dom.ta.value = xml;
|
||||
};
|
||||
|
||||
SQL.IO.prototype._clientsql = function() {
|
||||
var bp = this.owner.getOption("staticpath");
|
||||
var path = bp + "db/"+window.DATATYPES.getAttribute("db")+"/output.xsl";
|
||||
this.owner.window.showThrobber();
|
||||
OZ.Request(path, this._transform.bind(this), {xml:true});
|
||||
}
|
||||
SQL.IO.prototype.clientload = function () {
|
||||
var xml = this.dom.ta.value;
|
||||
if (!xml) {
|
||||
alert(_("empty"));
|
||||
return;
|
||||
}
|
||||
|
||||
SQL.IO.prototype._transform = function(xslDoc) {
|
||||
this.owner.window.hideThrobber();
|
||||
var xml = this.owner.toXML();
|
||||
var sql = "";
|
||||
try {
|
||||
if (window.XSLTProcessor && window.DOMParser) {
|
||||
var parser = new DOMParser();
|
||||
var xmlDoc = parser.parseFromString(xml, "text/xml");
|
||||
var xsl = new XSLTProcessor();
|
||||
xsl.importStylesheet(xslDoc);
|
||||
var result = xsl.transformToDocument(xmlDoc);
|
||||
sql = result.documentElement.textContent;
|
||||
} else if (window.ActiveXObject || "ActiveXObject" in window) {
|
||||
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
|
||||
xmlDoc.loadXML(xml);
|
||||
sql = xmlDoc.transformNode(xslDoc);
|
||||
} else {
|
||||
throw new Error("No XSLT processor available");
|
||||
}
|
||||
} catch(e) {
|
||||
alert(_("xmlerror")+': '+e.message);
|
||||
return;
|
||||
}
|
||||
this.dom.ta.value = sql.trim();
|
||||
}
|
||||
this.fromXMLText(xml);
|
||||
};
|
||||
|
||||
SQL.IO.prototype._quicksave = function(e) {
|
||||
this._currentStorage.quicksave(e);
|
||||
}
|
||||
SQL.IO.prototype.clientcopy = function () {
|
||||
var xml = this.owner.toXML();
|
||||
navigator.clipboard.writeText(xml).then(function() {
|
||||
alert(_("clientsave") + " - Copied to clipboard!");
|
||||
}).catch(function(err) {
|
||||
alert("Failed to copy: " + err);
|
||||
});
|
||||
};
|
||||
|
||||
SQL.IO.prototype._keydown = function(e) {
|
||||
switch (e.keyCode) {
|
||||
case 113:
|
||||
if (OZ.opera) {
|
||||
e.preventDefault();
|
||||
}
|
||||
this._currentStorage.quicksave(e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
SQL.IO.prototype.clientpaste = function () {
|
||||
var self = this;
|
||||
navigator.clipboard.readText().then(function(xml) {
|
||||
if (!xml) {
|
||||
alert(_("empty"));
|
||||
return;
|
||||
}
|
||||
self.fromXMLText(xml);
|
||||
}).catch(function(err) {
|
||||
alert("Failed to paste: " + err);
|
||||
});
|
||||
};
|
||||
|
||||
SQL.IO.prototype._addStorage = function(ctor, parent) {
|
||||
var storage = new ctor(this);
|
||||
if (!storage.isSupported()) { return; }
|
||||
SQL.IO.prototype.clientdownloadxml = function () {
|
||||
var xml = this.owner.toXML();
|
||||
this.downloadFile(xml, "new-database.xml", "application/xml");
|
||||
};
|
||||
|
||||
var option = storage.getOption();
|
||||
option.value = this._storages.length;
|
||||
parent.appendChild(option);
|
||||
this._storages.push(storage);
|
||||
}
|
||||
SQL.IO.prototype.clientdownloadtxt = function () {
|
||||
var xml = this.owner.toXML();
|
||||
this.downloadFile(xml, "new-database.txt", "text/plain");
|
||||
};
|
||||
SQL.IO.prototype.downloadFile = function (content, filename, mimeType) {
|
||||
var blob = new Blob([content], { type: mimeType });
|
||||
var url = URL.createObjectURL(blob);
|
||||
var a = document.createElement("a");
|
||||
a.href = url;
|
||||
a.download = filename;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
URL.revokeObjectURL(url);
|
||||
};
|
||||
SQL.IO.prototype.promptName = function (title, suffix) {
|
||||
var lastUsedName =
|
||||
this.owner.getOption("lastUsedName") || this.lastUsedName;
|
||||
var name = prompt(_(title), lastUsedName);
|
||||
if (!name) {
|
||||
return null;
|
||||
}
|
||||
if (suffix && name.endsWith(suffix)) {
|
||||
// remove suffix from name
|
||||
name = name.substr(0, name.length - 4);
|
||||
}
|
||||
this.owner.setOption("lastUsedName", name);
|
||||
this.lastUsedName = name; // save this also in variable in case cookies are disabled
|
||||
return name;
|
||||
};
|
||||
|
||||
SQL.IO.prototype._storageChange = function(e) {
|
||||
var index = Number(e.target.selectedIndex);
|
||||
this._setStorage(index);
|
||||
}
|
||||
SQL.IO.prototype.clientloadfromfile = function () {
|
||||
var self = this;
|
||||
var input = document.createElement("input");
|
||||
input.type = "file";
|
||||
input.accept = ".xml,.txt";
|
||||
input.onchange = function(e) {
|
||||
var file = e.target.files[0];
|
||||
if (!file) {
|
||||
return;
|
||||
}
|
||||
|
||||
SQL.IO.prototype._setStorage = function(index) {
|
||||
this.dom.select.selectedIndex = index;
|
||||
this._currentStorage && this._currentStorage.deactivate();
|
||||
this.dom.content.innerHTML = "";
|
||||
// Check file extension
|
||||
var fileName = file.name.toLowerCase();
|
||||
if (!fileName.endsWith(".xml") && !fileName.endsWith(".txt")) {
|
||||
alert(_("clientloadfromfile") + ": Please select an XML or TXT file.");
|
||||
return;
|
||||
}
|
||||
|
||||
this._currentStorage = this._storages[index];
|
||||
this._currentStorage.activate(this.dom.content);
|
||||
}
|
||||
var reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
var xml = e.target.result;
|
||||
if (!xml || xml.trim() === "") {
|
||||
alert(_("empty"));
|
||||
return;
|
||||
}
|
||||
self.fromXMLText(xml);
|
||||
};
|
||||
reader.onerror = function(e) {
|
||||
alert(_("xmlerror") + ": Failed to read file.");
|
||||
};
|
||||
reader.readAsText(file);
|
||||
};
|
||||
input.click();
|
||||
};
|
||||
|
||||
SQL.IO.prototype.clientlocalsave = function () {
|
||||
if (!window.localStorage) {
|
||||
alert("Sorry, your browser does not seem to support localStorage.");
|
||||
return;
|
||||
}
|
||||
|
||||
var xml = this.owner.toXML();
|
||||
if (xml.length >= (5 * 1024 * 1024) / 2) {
|
||||
/* this is a very big db structure... */
|
||||
alert(
|
||||
"Warning: your database structure is above 5 megabytes in size, this is above the localStorage single key limit allowed by some browsers, example Mozilla Firefox 10"
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
var key = this.promptName("serversaveprompt");
|
||||
if (!key) {
|
||||
return;
|
||||
}
|
||||
|
||||
key = "wwwsqldesigner_databases_" + (key || "default");
|
||||
|
||||
try {
|
||||
localStorage.setItem(key, xml);
|
||||
if (localStorage.getItem(key) != xml) {
|
||||
throw new Error("Content verification failed");
|
||||
}
|
||||
} catch (e) {
|
||||
alert(
|
||||
"Error saving database structure to localStorage! (" +
|
||||
e.message +
|
||||
")"
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
SQL.IO.prototype.clientlocalload = function () {
|
||||
if (!window.localStorage) {
|
||||
alert("Sorry, your browser does not seem to support localStorage.");
|
||||
return;
|
||||
}
|
||||
|
||||
var key = this.promptName("serverloadprompt");
|
||||
if (!key) {
|
||||
return;
|
||||
}
|
||||
|
||||
key = "wwwsqldesigner_databases_" + (key || "default");
|
||||
|
||||
try {
|
||||
var xml = localStorage.getItem(key);
|
||||
if (!xml) {
|
||||
throw new Error("No data available");
|
||||
}
|
||||
} catch (e) {
|
||||
alert(
|
||||
"Error loading database structure from localStorage! (" +
|
||||
e.message +
|
||||
")"
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
this.fromXMLText(xml);
|
||||
};
|
||||
|
||||
SQL.IO.prototype.clientlocallist = function () {
|
||||
if (!window.localStorage) {
|
||||
alert("Sorry, your browser does not seem to support localStorage.");
|
||||
return;
|
||||
}
|
||||
|
||||
/* --- Define some useful vars --- */
|
||||
var baseKeysName = "wwwsqldesigner_databases_";
|
||||
var localLen = localStorage.length;
|
||||
var data = "";
|
||||
var schemasFound = false;
|
||||
var code = 200;
|
||||
|
||||
/* --- work --- */
|
||||
try {
|
||||
for (var i = 0; i < localLen; ++i) {
|
||||
var key = localStorage.key(i);
|
||||
if (new RegExp(baseKeysName).test(key)) {
|
||||
var result = key.substring(baseKeysName.length);
|
||||
schemasFound = true;
|
||||
data += result + "\n";
|
||||
}
|
||||
}
|
||||
if (!schemasFound) {
|
||||
throw new Error("No data available");
|
||||
}
|
||||
} catch (e) {
|
||||
alert(
|
||||
"Error loading database names from localStorage! (" +
|
||||
e.message +
|
||||
")"
|
||||
);
|
||||
return;
|
||||
}
|
||||
this.listresponse(data, code);
|
||||
};
|
||||
|
||||
/* ------------------------- Dropbox start ------------------------ */
|
||||
|
||||
/**
|
||||
* The following code uses this lib: https://github.com/dropbox/dropbox-js
|
||||
*/
|
||||
SQL.IO.prototype.dropBoxInit = function () {
|
||||
if (CONFIG.DROPBOX_KEY) {
|
||||
this.dropboxClient = new Dropbox.Client({ key: CONFIG.DROPBOX_KEY });
|
||||
} else {
|
||||
this.dropboxClient = null;
|
||||
// Hide the Dropbox buttons
|
||||
var elems = document.querySelectorAll("[id^=dropbox]"); // gets all tags whose id start with "dropbox"
|
||||
[].slice.call(elems).forEach(function (elem) {
|
||||
elem.style.display = "none";
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
SQL.IO.prototype.showDropboxError = function (error) {
|
||||
var prefix = _("Dropbox error") + ": ";
|
||||
var msg = error.status;
|
||||
|
||||
switch (error.status) {
|
||||
case Dropbox.ApiError.INVALID_TOKEN:
|
||||
// If you're using dropbox.js, the only cause behind this error is that
|
||||
// the user token expired.
|
||||
// Get the user through the authentication flow again.
|
||||
msg = _(
|
||||
"Token expired - retry the operation, authenticating again with Dropbox"
|
||||
);
|
||||
this.dropboxClient.reset();
|
||||
break;
|
||||
|
||||
case Dropbox.ApiError.NOT_FOUND:
|
||||
// The file or folder you tried to access is not in the user's Dropbox.
|
||||
// Handling this error is specific to your application.
|
||||
msg = _("File not found");
|
||||
break;
|
||||
|
||||
case Dropbox.ApiError.OVER_QUOTA:
|
||||
// The user is over their Dropbox quota.
|
||||
// Tell them their Dropbox is full. Refreshing the page won't help.
|
||||
msg = _("Dropbox is full");
|
||||
break;
|
||||
|
||||
case Dropbox.ApiError.RATE_LIMITED:
|
||||
// Too many API requests. Tell the user to try again later.
|
||||
// Long-term, optimize your code to use fewer API calls.
|
||||
break;
|
||||
|
||||
case Dropbox.ApiError.NETWORK_ERROR:
|
||||
// An error occurred at the XMLHttpRequest layer.
|
||||
// Most likely, the user's network connection is down.
|
||||
// API calls will not succeed until the user gets back online.
|
||||
msg = _("Network error");
|
||||
break;
|
||||
|
||||
case Dropbox.ApiError.INVALID_PARAM:
|
||||
case Dropbox.ApiError.OAUTH_ERROR:
|
||||
case Dropbox.ApiError.INVALID_METHOD:
|
||||
default:
|
||||
// Caused by a bug in dropbox.js, in your application, or in Dropbox.
|
||||
// Tell the user an error occurred, ask them to refresh the page.
|
||||
}
|
||||
|
||||
alert(prefix + msg);
|
||||
};
|
||||
|
||||
SQL.IO.prototype.showDropboxAuthenticate = function (connectedCallBack) {
|
||||
if (!this.dropboxClient) return false;
|
||||
|
||||
// We want to use a popup window for authentication as the default redirection won't work for us as it'll make us lose our schema data
|
||||
var href = window.location.href;
|
||||
var prefix = href.substring(0, href.lastIndexOf("/")) + "/";
|
||||
this.dropboxClient.authDriver(
|
||||
new Dropbox.AuthDriver.Popup({
|
||||
receiverUrl: prefix + "dropbox-oauth-receiver.html",
|
||||
})
|
||||
);
|
||||
|
||||
// Now let's authenticate us
|
||||
var sql_io = this;
|
||||
sql_io.dropboxClient.authenticate(function (error, client) {
|
||||
if (error) {
|
||||
sql_io.showDropboxError(error);
|
||||
} else {
|
||||
// We're authenticated
|
||||
connectedCallBack();
|
||||
}
|
||||
return;
|
||||
});
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
SQL.IO.prototype.dropboxsave = function () {
|
||||
var sql_io = this;
|
||||
sql_io.showDropboxAuthenticate(function () {
|
||||
var key = sql_io.promptName("serversaveprompt", ".xml");
|
||||
if (!key) {
|
||||
return;
|
||||
}
|
||||
|
||||
var filename = (key || "default") + ".xml";
|
||||
|
||||
sql_io.listresponse("Saving...", 200);
|
||||
var xml = sql_io.owner.toXML();
|
||||
sql_io.dropboxClient.writeFile(filename, xml, function (error, stat) {
|
||||
if (error) {
|
||||
sql_io.listresponse("", 200);
|
||||
return sql_io.showDropboxError(error);
|
||||
}
|
||||
sql_io.listresponse(
|
||||
filename + " " + _("was saved to Dropbox"),
|
||||
200
|
||||
);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
SQL.IO.prototype.dropboxload = function () {
|
||||
var sql_io = this;
|
||||
sql_io.showDropboxAuthenticate(function () {
|
||||
var key = sql_io.promptName("serverloadprompt", ".xml");
|
||||
if (!key) {
|
||||
return;
|
||||
}
|
||||
|
||||
var filename = (key || "default") + ".xml";
|
||||
|
||||
sql_io.listresponse("Loading...", 200);
|
||||
sql_io.dropboxClient.readFile(filename, function (error, data) {
|
||||
sql_io.listresponse("", 200);
|
||||
if (error) {
|
||||
return sql_io.showDropboxError(error);
|
||||
}
|
||||
sql_io.fromXMLText(data);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
SQL.IO.prototype.dropboxlist = function () {
|
||||
var sql_io = this;
|
||||
sql_io.showDropboxAuthenticate(function () {
|
||||
sql_io.listresponse("Loading...", 200);
|
||||
sql_io.dropboxClient.readdir("/", function (error, entries) {
|
||||
if (error) {
|
||||
sql_io.listresponse("", 200);
|
||||
return sql_io.showDropboxError(error);
|
||||
}
|
||||
var data = entries.join("\n") + "\n";
|
||||
sql_io.listresponse(data, 200);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/* ------------------------- Dropbox end ------------------------ */
|
||||
|
||||
SQL.IO.prototype.clientsql = function () {
|
||||
var bp = this.owner.getOption("staticpath");
|
||||
var path = bp + "db/" + window.DATATYPES.getAttribute("db") + "/output.xsl";
|
||||
var h = this.owner.getXhrHeaders();
|
||||
this.owner.window.showThrobber();
|
||||
OZ.Request(path, this.finish.bind(this), { xml: true, headers: h });
|
||||
};
|
||||
|
||||
SQL.IO.prototype.finish = function (xslDoc) {
|
||||
this.owner.window.hideThrobber();
|
||||
var xml = this.owner.toXML();
|
||||
var sql = "";
|
||||
try {
|
||||
if (window.XSLTProcessor && window.DOMParser) {
|
||||
var parser = new DOMParser();
|
||||
var xmlDoc = parser.parseFromString(xml, "text/xml");
|
||||
var xsl = new XSLTProcessor();
|
||||
xsl.importStylesheet(xslDoc);
|
||||
var result = xsl.transformToDocument(xmlDoc);
|
||||
sql = result.documentElement.textContent;
|
||||
} else if (window.ActiveXObject || "ActiveXObject" in window) {
|
||||
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
|
||||
xmlDoc.loadXML(xml);
|
||||
sql = xmlDoc.transformNode(xslDoc);
|
||||
} else {
|
||||
throw new Error("No XSLT processor available");
|
||||
}
|
||||
} catch (e) {
|
||||
alert(_("xmlerror") + ": " + e.message);
|
||||
return;
|
||||
}
|
||||
this.dom.ta.value = sql.trim();
|
||||
};
|
||||
|
||||
SQL.IO.prototype.serversave = function (e, keyword) {
|
||||
var name = keyword || prompt(_("serversaveprompt"), this._name);
|
||||
if (!name) {
|
||||
return;
|
||||
}
|
||||
this._name = name;
|
||||
var xml = this.owner.toXML();
|
||||
var bp = this.owner.getOption("xhrpath");
|
||||
var url =
|
||||
bp +
|
||||
"backend/" +
|
||||
this.dom.backend.value +
|
||||
"/?action=save&keyword=" +
|
||||
encodeURIComponent(name);
|
||||
var h = this.owner.getXhrHeaders();
|
||||
h["Content-type"] = "application/xml";
|
||||
this.owner.window.showThrobber();
|
||||
this.owner.setTitle(name);
|
||||
OZ.Request(url, this.saveresponse, {
|
||||
xml: true,
|
||||
method: "post",
|
||||
data: xml,
|
||||
headers: h,
|
||||
});
|
||||
};
|
||||
|
||||
SQL.IO.prototype.quicksave = function (e) {
|
||||
this.serversave(e, this._name);
|
||||
};
|
||||
|
||||
SQL.IO.prototype.serverload = function (e, keyword) {
|
||||
var name = keyword || prompt(_("serverloadprompt"), this._name);
|
||||
if (!name) {
|
||||
return;
|
||||
}
|
||||
this._name = name;
|
||||
var bp = this.owner.getOption("xhrpath");
|
||||
var url =
|
||||
bp +
|
||||
"backend/" +
|
||||
this.dom.backend.value +
|
||||
"/?action=load&keyword=" +
|
||||
encodeURIComponent(name);
|
||||
var h = this.owner.getXhrHeaders();
|
||||
this.owner.window.showThrobber();
|
||||
this.name = name;
|
||||
OZ.Request(url, this.loadresponse, { xml: true, headers: h });
|
||||
};
|
||||
|
||||
SQL.IO.prototype.serverlist = function (e) {
|
||||
var bp = this.owner.getOption("xhrpath");
|
||||
var url = bp + "backend/" + this.dom.backend.value + "/?action=list";
|
||||
var h = this.owner.getXhrHeaders();
|
||||
this.owner.window.showThrobber();
|
||||
OZ.Request(url, this.listresponse, { headers: h });
|
||||
};
|
||||
|
||||
SQL.IO.prototype.serverimport = function (e) {
|
||||
var name = prompt(_("serverimportprompt"), "");
|
||||
if (!name) {
|
||||
return;
|
||||
}
|
||||
var bp = this.owner.getOption("xhrpath");
|
||||
var url =
|
||||
bp +
|
||||
"backend/" +
|
||||
this.dom.backend.value +
|
||||
"/?action=import&database=" +
|
||||
name;
|
||||
var h = this.owner.getXhrHeaders();
|
||||
this.owner.window.showThrobber();
|
||||
OZ.Request(url, this.importresponse, { xml: true, headers: h });
|
||||
};
|
||||
|
||||
SQL.IO.prototype.check = function (code) {
|
||||
switch (code) {
|
||||
case 201:
|
||||
case 404:
|
||||
case 500:
|
||||
case 501:
|
||||
case 503:
|
||||
var lang = "http" + code;
|
||||
this.dom.ta.value = _("httpresponse") + ": " + _(lang);
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
SQL.IO.prototype.saveresponse = function (data, code) {
|
||||
this.owner.window.hideThrobber();
|
||||
this.check(code);
|
||||
};
|
||||
|
||||
SQL.IO.prototype.loadresponse = function (data, code) {
|
||||
this.owner.window.hideThrobber();
|
||||
if (!this.check(code)) {
|
||||
return;
|
||||
}
|
||||
this.fromXML(data);
|
||||
this.owner.setTitle(this.name);
|
||||
};
|
||||
|
||||
SQL.IO.prototype.listresponse = function (data, code) {
|
||||
this.owner.window.hideThrobber();
|
||||
if (!this.check(code)) {
|
||||
return;
|
||||
}
|
||||
this.dom.ta.value = data;
|
||||
};
|
||||
|
||||
SQL.IO.prototype.importresponse = function (data, code) {
|
||||
this.owner.window.hideThrobber();
|
||||
if (!this.check(code)) {
|
||||
return;
|
||||
}
|
||||
if (this.fromXML(data)) {
|
||||
this.owner.alignTables();
|
||||
}
|
||||
};
|
||||
|
||||
SQL.IO.prototype.press = function (e) {
|
||||
switch (e.keyCode) {
|
||||
case 113:
|
||||
if (OZ.opera) {
|
||||
e.preventDefault();
|
||||
}
|
||||
this.quicksave(e);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,72 +1,81 @@
|
||||
/* --------------------- db index ------------ */
|
||||
SQL.Key = function(owner, type, name) {
|
||||
this.owner = owner;
|
||||
this.rows = [];
|
||||
this.type = type || "INDEX";
|
||||
this.name = name || "";
|
||||
SQL.Visual.apply(this);
|
||||
}
|
||||
SQL.Key = function (owner, type, name) {
|
||||
this.owner = owner;
|
||||
this.rows = [];
|
||||
this.type = type || "INDEX";
|
||||
this.name = name || "";
|
||||
SQL.Visual.apply(this);
|
||||
};
|
||||
SQL.Key.prototype = Object.create(SQL.Visual.prototype);
|
||||
|
||||
SQL.Key.prototype.setName = function(n) {
|
||||
this.name = n;
|
||||
}
|
||||
SQL.Key.prototype.setName = function (n) {
|
||||
this.name = n;
|
||||
};
|
||||
|
||||
SQL.Key.prototype.getName = function() {
|
||||
return this.name;
|
||||
}
|
||||
SQL.Key.prototype.getName = function () {
|
||||
return this.name;
|
||||
};
|
||||
|
||||
SQL.Key.prototype.setType = function(t) {
|
||||
if (!t) { return; }
|
||||
this.type = t;
|
||||
for (var i=0;i<this.rows.length;i++) { this.rows[i].redraw(); }
|
||||
}
|
||||
SQL.Key.prototype.setType = function (t) {
|
||||
if (!t) {
|
||||
return;
|
||||
}
|
||||
this.type = t;
|
||||
for (var i = 0; i < this.rows.length; i++) {
|
||||
this.rows[i].redraw();
|
||||
}
|
||||
};
|
||||
|
||||
SQL.Key.prototype.getType = function() {
|
||||
return this.type;
|
||||
}
|
||||
SQL.Key.prototype.getType = function () {
|
||||
return this.type;
|
||||
};
|
||||
|
||||
SQL.Key.prototype.addRow = function(r) {
|
||||
if (r.owner != this.owner) { return; }
|
||||
this.rows.push(r);
|
||||
r.addKey(this);
|
||||
}
|
||||
SQL.Key.prototype.addRow = function (r) {
|
||||
if (r.owner != this.owner) {
|
||||
return;
|
||||
}
|
||||
this.rows.push(r);
|
||||
r.addKey(this);
|
||||
};
|
||||
|
||||
SQL.Key.prototype.removeRow = function(r) {
|
||||
var idx = this.rows.indexOf(r);
|
||||
if (idx == -1) { return; }
|
||||
r.removeKey(this);
|
||||
this.rows.splice(idx,1);
|
||||
}
|
||||
SQL.Key.prototype.removeRow = function (r) {
|
||||
var idx = this.rows.indexOf(r);
|
||||
if (idx == -1) {
|
||||
return;
|
||||
}
|
||||
r.removeKey(this);
|
||||
this.rows.splice(idx, 1);
|
||||
};
|
||||
|
||||
SQL.Key.prototype.destroy = function() {
|
||||
for (var i=0;i<this.rows.length;i++) {
|
||||
this.rows[i].removeKey(this);
|
||||
}
|
||||
}
|
||||
SQL.Key.prototype.destroy = function () {
|
||||
for (var i = 0; i < this.rows.length; i++) {
|
||||
this.rows[i].removeKey(this);
|
||||
}
|
||||
};
|
||||
|
||||
SQL.Key.prototype.getLabel = function() {
|
||||
return this.name || this.type;
|
||||
}
|
||||
SQL.Key.prototype.getLabel = function () {
|
||||
return this.name || this.type;
|
||||
};
|
||||
|
||||
SQL.Key.prototype.toXML = function() {
|
||||
var xml = "";
|
||||
xml += '<key type="'+this.getType()+'" name="'+this.getName()+'">\n';
|
||||
for (var i=0;i<this.rows.length;i++) {
|
||||
var r = this.rows[i];
|
||||
xml += '<part>'+r.getTitle()+'</part>\n';
|
||||
}
|
||||
xml += '</key>\n';
|
||||
return xml;
|
||||
}
|
||||
SQL.Key.prototype.toXML = function () {
|
||||
var xml = "";
|
||||
xml +=
|
||||
'<key type="' + this.getType() + '" name="' + this.getName() + '">\n';
|
||||
for (var i = 0; i < this.rows.length; i++) {
|
||||
var r = this.rows[i];
|
||||
xml += "<part>" + r.getTitle() + "</part>\n";
|
||||
}
|
||||
xml += "</key>\n";
|
||||
return xml;
|
||||
};
|
||||
|
||||
SQL.Key.prototype.fromXML = function(node) {
|
||||
this.setType(node.getAttribute("type"));
|
||||
this.setName(node.getAttribute("name"));
|
||||
var parts = node.getElementsByTagName("part");
|
||||
for (var i=0;i<parts.length;i++) {
|
||||
var name = parts[i].firstChild.nodeValue;
|
||||
var row = this.owner.findNamedRow(name);
|
||||
this.addRow(row);
|
||||
}
|
||||
}
|
||||
SQL.Key.prototype.fromXML = function (node) {
|
||||
this.setType(node.getAttribute("type"));
|
||||
this.setName(node.getAttribute("name"));
|
||||
var parts = node.getElementsByTagName("part");
|
||||
for (var i = 0; i < parts.length; i++) {
|
||||
var name = parts[i].firstChild.nodeValue;
|
||||
var row = this.owner.findNamedRow(name);
|
||||
this.addRow(row);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,202 +1,224 @@
|
||||
/* ----------------- key manager ---------- */
|
||||
|
||||
SQL.KeyManager = function(owner) {
|
||||
this.owner = owner;
|
||||
this.dom = {
|
||||
container:OZ.$("keys")
|
||||
}
|
||||
this.build();
|
||||
}
|
||||
SQL.KeyManager = function (owner) {
|
||||
this.owner = owner;
|
||||
this.dom = {
|
||||
container: OZ.$("keys"),
|
||||
};
|
||||
this.build();
|
||||
};
|
||||
|
||||
SQL.KeyManager.prototype.build = function() {
|
||||
this.dom.list = OZ.$("keyslist");
|
||||
this.dom.type = OZ.$("keytype");
|
||||
this.dom.name = OZ.$("keyname");
|
||||
this.dom.left = OZ.$("keyleft");
|
||||
this.dom.right = OZ.$("keyright");
|
||||
this.dom.fields = OZ.$("keyfields");
|
||||
this.dom.avail = OZ.$("keyavail");
|
||||
this.dom.listlabel = OZ.$("keyslistlabel");
|
||||
SQL.KeyManager.prototype.build = function () {
|
||||
this.dom.list = OZ.$("keyslist");
|
||||
this.dom.type = OZ.$("keytype");
|
||||
this.dom.name = OZ.$("keyname");
|
||||
this.dom.left = OZ.$("keyleft");
|
||||
this.dom.right = OZ.$("keyright");
|
||||
this.dom.fields = OZ.$("keyfields");
|
||||
this.dom.avail = OZ.$("keyavail");
|
||||
this.dom.listlabel = OZ.$("keyslistlabel");
|
||||
|
||||
var ids = ["keyadd","keyremove"];
|
||||
for (var i=0;i<ids.length;i++) {
|
||||
var id = ids[i];
|
||||
var elm = OZ.$(id);
|
||||
this.dom[id] = elm;
|
||||
elm.value = _(id);
|
||||
}
|
||||
var ids = ["keyadd", "keyremove"];
|
||||
for (var i = 0; i < ids.length; i++) {
|
||||
var id = ids[i];
|
||||
var elm = OZ.$(id);
|
||||
this.dom[id] = elm;
|
||||
elm.value = _(id);
|
||||
}
|
||||
|
||||
var ids = ["keyedit","keytypelabel","keynamelabel","keyfieldslabel","keyavaillabel"];
|
||||
for (var i=0;i<ids.length;i++) {
|
||||
var id = ids[i];
|
||||
var elm = OZ.$(id);
|
||||
elm.innerHTML = _(id);
|
||||
}
|
||||
var ids = [
|
||||
"keyedit",
|
||||
"keytypelabel",
|
||||
"keynamelabel",
|
||||
"keyfieldslabel",
|
||||
"keyavaillabel",
|
||||
];
|
||||
for (var i = 0; i < ids.length; i++) {
|
||||
var id = ids[i];
|
||||
var elm = OZ.$(id);
|
||||
elm.innerHTML = _(id);
|
||||
}
|
||||
|
||||
var types = ["PRIMARY","INDEX","UNIQUE","FULLTEXT"];
|
||||
OZ.DOM.clear(this.dom.type);
|
||||
for (var i=0;i<types.length;i++) {
|
||||
var o = OZ.DOM.elm("option");
|
||||
o.innerHTML = types[i];
|
||||
o.value = types[i];
|
||||
this.dom.type.appendChild(o);
|
||||
}
|
||||
var types = ["PRIMARY", "INDEX", "UNIQUE", "FULLTEXT"];
|
||||
OZ.DOM.clear(this.dom.type);
|
||||
for (var i = 0; i < types.length; i++) {
|
||||
var o = OZ.DOM.elm("option");
|
||||
o.innerHTML = types[i];
|
||||
o.value = types[i];
|
||||
this.dom.type.appendChild(o);
|
||||
}
|
||||
|
||||
this.purge = this.purge.bind(this);
|
||||
this.purge = this.purge.bind(this);
|
||||
|
||||
OZ.Event.add(this.dom.list, "change", this.listchange.bind(this));
|
||||
OZ.Event.add(this.dom.type, "change", this.typechange.bind(this));
|
||||
OZ.Event.add(this.dom.name, "keyup", this.namechange.bind(this));
|
||||
OZ.Event.add(this.dom.keyadd, "click", this.add.bind(this));
|
||||
OZ.Event.add(this.dom.keyremove, "click", this.remove.bind(this));
|
||||
OZ.Event.add(this.dom.left, "click", this.left.bind(this));
|
||||
OZ.Event.add(this.dom.right, "click", this.right.bind(this));
|
||||
OZ.Event.add(this.dom.list, "change", this.listchange.bind(this));
|
||||
OZ.Event.add(this.dom.type, "change", this.typechange.bind(this));
|
||||
OZ.Event.add(this.dom.name, "keyup", this.namechange.bind(this));
|
||||
OZ.Event.add(this.dom.keyadd, "click", this.add.bind(this));
|
||||
OZ.Event.add(this.dom.keyremove, "click", this.remove.bind(this));
|
||||
OZ.Event.add(this.dom.left, "click", this.left.bind(this));
|
||||
OZ.Event.add(this.dom.right, "click", this.right.bind(this));
|
||||
|
||||
this.dom.container.parentNode.removeChild(this.dom.container);
|
||||
}
|
||||
this.dom.container.parentNode.removeChild(this.dom.container);
|
||||
};
|
||||
|
||||
SQL.KeyManager.prototype.listchange = function(e) {
|
||||
this.switchTo(this.dom.list.selectedIndex);
|
||||
}
|
||||
SQL.KeyManager.prototype.listchange = function (e) {
|
||||
this.switchTo(this.dom.list.selectedIndex);
|
||||
};
|
||||
|
||||
SQL.KeyManager.prototype.typechange = function(e) {
|
||||
this.key.setType(this.dom.type.value);
|
||||
this.redrawListItem();
|
||||
}
|
||||
SQL.KeyManager.prototype.typechange = function (e) {
|
||||
this.key.setType(this.dom.type.value);
|
||||
this.redrawListItem();
|
||||
};
|
||||
|
||||
SQL.KeyManager.prototype.namechange = function(e) {
|
||||
this.key.setName(this.dom.name.value);
|
||||
this.redrawListItem();
|
||||
}
|
||||
SQL.KeyManager.prototype.namechange = function (e) {
|
||||
this.key.setName(this.dom.name.value);
|
||||
this.redrawListItem();
|
||||
};
|
||||
|
||||
SQL.KeyManager.prototype.add = function(e) {
|
||||
var type = (this.table.keys.length ? "INDEX" : "PRIMARY");
|
||||
this.table.addKey(type);
|
||||
this.sync(this.table);
|
||||
this.switchTo(this.table.keys.length-1);
|
||||
}
|
||||
SQL.KeyManager.prototype.add = function (e) {
|
||||
var type = this.table.keys.length ? "INDEX" : "PRIMARY";
|
||||
this.table.addKey(type);
|
||||
this.sync(this.table);
|
||||
this.switchTo(this.table.keys.length - 1);
|
||||
};
|
||||
|
||||
SQL.KeyManager.prototype.remove = function(e) {
|
||||
var index = this.dom.list.selectedIndex;
|
||||
if (index == -1) { return; }
|
||||
var r = this.table.keys[index];
|
||||
this.table.removeKey(r);
|
||||
this.sync(this.table);
|
||||
}
|
||||
SQL.KeyManager.prototype.remove = function (e) {
|
||||
var index = this.dom.list.selectedIndex;
|
||||
if (index == -1) {
|
||||
return;
|
||||
}
|
||||
var r = this.table.keys[index];
|
||||
this.table.removeKey(r);
|
||||
this.sync(this.table);
|
||||
};
|
||||
|
||||
SQL.KeyManager.prototype.purge = function() { /* remove empty keys */
|
||||
for (var i=this.table.keys.length-1;i>=0;i--) {
|
||||
var k = this.table.keys[i];
|
||||
if (!k.rows.length) { this.table.removeKey(k); }
|
||||
}
|
||||
}
|
||||
SQL.KeyManager.prototype.purge = function () {
|
||||
/* remove empty keys */
|
||||
for (var i = this.table.keys.length - 1; i >= 0; i--) {
|
||||
var k = this.table.keys[i];
|
||||
if (!k.rows.length) {
|
||||
this.table.removeKey(k);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
SQL.KeyManager.prototype.sync = function(table) { /* sync content with given table */
|
||||
this.table = table;
|
||||
this.dom.listlabel.innerHTML = _("keyslistlabel").replace(/%s/,table.getTitle());
|
||||
SQL.KeyManager.prototype.sync = function (table) {
|
||||
/* sync content with given table */
|
||||
this.table = table;
|
||||
this.dom.listlabel.innerHTML = _("keyslistlabel").replace(
|
||||
/%s/,
|
||||
table.getTitle()
|
||||
);
|
||||
|
||||
OZ.DOM.clear(this.dom.list);
|
||||
for (var i=0;i<table.keys.length;i++) {
|
||||
var k = table.keys[i];
|
||||
var o = OZ.DOM.elm("option");
|
||||
this.dom.list.appendChild(o);
|
||||
var str = (i+1)+": "+k.getLabel();
|
||||
o.innerHTML = str;
|
||||
}
|
||||
if (table.keys.length) {
|
||||
this.switchTo(0);
|
||||
} else {
|
||||
this.disable();
|
||||
}
|
||||
}
|
||||
OZ.DOM.clear(this.dom.list);
|
||||
for (var i = 0; i < table.keys.length; i++) {
|
||||
var k = table.keys[i];
|
||||
var o = OZ.DOM.elm("option");
|
||||
this.dom.list.appendChild(o);
|
||||
var str = i + 1 + ": " + k.getLabel();
|
||||
o.innerHTML = str;
|
||||
}
|
||||
if (table.keys.length) {
|
||||
this.switchTo(0);
|
||||
} else {
|
||||
this.disable();
|
||||
}
|
||||
};
|
||||
|
||||
SQL.KeyManager.prototype.redrawListItem = function() {
|
||||
var index = this.table.keys.indexOf(this.key);
|
||||
this.option.innerHTML = (index+1)+": "+this.key.getLabel();
|
||||
}
|
||||
SQL.KeyManager.prototype.redrawListItem = function () {
|
||||
var index = this.table.keys.indexOf(this.key);
|
||||
this.option.innerHTML = index + 1 + ": " + this.key.getLabel();
|
||||
};
|
||||
|
||||
SQL.KeyManager.prototype.switchTo = function(index) { /* show Nth key */
|
||||
this.enable();
|
||||
var k = this.table.keys[index];
|
||||
this.key = k;
|
||||
this.option = this.dom.list.getElementsByTagName("option")[index];
|
||||
SQL.KeyManager.prototype.switchTo = function (index) {
|
||||
/* show Nth key */
|
||||
this.enable();
|
||||
var k = this.table.keys[index];
|
||||
this.key = k;
|
||||
this.option = this.dom.list.getElementsByTagName("option")[index];
|
||||
|
||||
this.dom.list.selectedIndex = index;
|
||||
this.dom.name.value = k.getName();
|
||||
this.dom.list.selectedIndex = index;
|
||||
this.dom.name.value = k.getName();
|
||||
|
||||
var opts = this.dom.type.getElementsByTagName("option");
|
||||
for (var i=0;i<opts.length;i++) {
|
||||
if (opts[i].value == k.getType()) { this.dom.type.selectedIndex = i; }
|
||||
}
|
||||
var opts = this.dom.type.getElementsByTagName("option");
|
||||
for (var i = 0; i < opts.length; i++) {
|
||||
if (opts[i].value == k.getType()) {
|
||||
this.dom.type.selectedIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
OZ.DOM.clear(this.dom.fields);
|
||||
for (var i=0;i<k.rows.length;i++) {
|
||||
var o = OZ.DOM.elm("option");
|
||||
o.innerHTML = k.rows[i].getTitle();
|
||||
o.value = o.innerHTML;
|
||||
this.dom.fields.appendChild(o);
|
||||
}
|
||||
OZ.DOM.clear(this.dom.fields);
|
||||
for (var i = 0; i < k.rows.length; i++) {
|
||||
var o = OZ.DOM.elm("option");
|
||||
o.innerHTML = k.rows[i].getTitle();
|
||||
o.value = o.innerHTML;
|
||||
this.dom.fields.appendChild(o);
|
||||
}
|
||||
|
||||
OZ.DOM.clear(this.dom.avail);
|
||||
for (var i=0;i<this.table.rows.length;i++) {
|
||||
var r = this.table.rows[i];
|
||||
if (k.rows.indexOf(r) != -1) { continue; }
|
||||
var o = OZ.DOM.elm("option");
|
||||
o.innerHTML = r.getTitle();
|
||||
o.value = o.innerHTML;
|
||||
this.dom.avail.appendChild(o);
|
||||
}
|
||||
}
|
||||
OZ.DOM.clear(this.dom.avail);
|
||||
for (var i = 0; i < this.table.rows.length; i++) {
|
||||
var r = this.table.rows[i];
|
||||
if (k.rows.indexOf(r) != -1) {
|
||||
continue;
|
||||
}
|
||||
var o = OZ.DOM.elm("option");
|
||||
o.innerHTML = r.getTitle();
|
||||
o.value = o.innerHTML;
|
||||
this.dom.avail.appendChild(o);
|
||||
}
|
||||
};
|
||||
|
||||
SQL.KeyManager.prototype.disable = function() {
|
||||
OZ.DOM.clear(this.dom.fields);
|
||||
OZ.DOM.clear(this.dom.avail);
|
||||
this.dom.keyremove.disabled = true;
|
||||
this.dom.left.disabled = true;
|
||||
this.dom.right.disabled = true;
|
||||
this.dom.list.disabled = true;
|
||||
this.dom.name.disabled = true;
|
||||
this.dom.type.disabled = true;
|
||||
this.dom.fields.disabled = true;
|
||||
this.dom.avail.disabled = true;
|
||||
}
|
||||
SQL.KeyManager.prototype.disable = function () {
|
||||
OZ.DOM.clear(this.dom.fields);
|
||||
OZ.DOM.clear(this.dom.avail);
|
||||
this.dom.keyremove.disabled = true;
|
||||
this.dom.left.disabled = true;
|
||||
this.dom.right.disabled = true;
|
||||
this.dom.list.disabled = true;
|
||||
this.dom.name.disabled = true;
|
||||
this.dom.type.disabled = true;
|
||||
this.dom.fields.disabled = true;
|
||||
this.dom.avail.disabled = true;
|
||||
};
|
||||
|
||||
SQL.KeyManager.prototype.enable = function() {
|
||||
this.dom.keyremove.disabled = false;
|
||||
this.dom.left.disabled = false;
|
||||
this.dom.right.disabled = false;
|
||||
this.dom.list.disabled = false;
|
||||
this.dom.name.disabled = false;
|
||||
this.dom.type.disabled = false;
|
||||
this.dom.fields.disabled = false;
|
||||
this.dom.avail.disabled = false;
|
||||
}
|
||||
SQL.KeyManager.prototype.enable = function () {
|
||||
this.dom.keyremove.disabled = false;
|
||||
this.dom.left.disabled = false;
|
||||
this.dom.right.disabled = false;
|
||||
this.dom.list.disabled = false;
|
||||
this.dom.name.disabled = false;
|
||||
this.dom.type.disabled = false;
|
||||
this.dom.fields.disabled = false;
|
||||
this.dom.avail.disabled = false;
|
||||
};
|
||||
|
||||
SQL.KeyManager.prototype.left = function(e) { /* add field to index */
|
||||
var opts = this.dom.avail.getElementsByTagName("option");
|
||||
for (var i=0;i<opts.length;i++) {
|
||||
var o = opts[i];
|
||||
if (o.selected) {
|
||||
var row = this.table.findNamedRow(o.value);
|
||||
this.key.addRow(row);
|
||||
}
|
||||
}
|
||||
this.switchTo(this.dom.list.selectedIndex);
|
||||
}
|
||||
SQL.KeyManager.prototype.left = function (e) {
|
||||
/* add field to index */
|
||||
var opts = this.dom.avail.getElementsByTagName("option");
|
||||
for (var i = 0; i < opts.length; i++) {
|
||||
var o = opts[i];
|
||||
if (o.selected) {
|
||||
var row = this.table.findNamedRow(o.value);
|
||||
this.key.addRow(row);
|
||||
}
|
||||
}
|
||||
this.switchTo(this.dom.list.selectedIndex);
|
||||
};
|
||||
|
||||
SQL.KeyManager.prototype.right = function(e) { /* remove field from index */
|
||||
var opts = this.dom.fields.getElementsByTagName("option");
|
||||
for (var i=0;i<opts.length;i++) {
|
||||
var o = opts[i];
|
||||
if (o.selected) {
|
||||
var row = this.table.findNamedRow(o.value);
|
||||
this.key.removeRow(row);
|
||||
}
|
||||
}
|
||||
this.switchTo(this.dom.list.selectedIndex);
|
||||
}
|
||||
SQL.KeyManager.prototype.right = function (e) {
|
||||
/* remove field from index */
|
||||
var opts = this.dom.fields.getElementsByTagName("option");
|
||||
for (var i = 0; i < opts.length; i++) {
|
||||
var o = opts[i];
|
||||
if (o.selected) {
|
||||
var row = this.table.findNamedRow(o.value);
|
||||
this.key.removeRow(row);
|
||||
}
|
||||
}
|
||||
this.switchTo(this.dom.list.selectedIndex);
|
||||
};
|
||||
|
||||
SQL.KeyManager.prototype.open = function(table) {
|
||||
this.sync(table);
|
||||
this.owner.window.open(_("tablekeys"),this.dom.container,this.purge);
|
||||
}
|
||||
SQL.KeyManager.prototype.open = function (table) {
|
||||
this.sync(table);
|
||||
this.owner.window.open(_("tablekeys"), this.dom.container, this.purge);
|
||||
};
|
||||
|
||||
@@ -1,118 +1,128 @@
|
||||
/* --------------------- minimap ------------ */
|
||||
|
||||
SQL.Map = function(owner) {
|
||||
this.owner = owner;
|
||||
SQL.Visual.apply(this);
|
||||
this.dom.container = OZ.$("minimap");
|
||||
this.width = this.dom.container.offsetWidth - 2;
|
||||
this.height = this.dom.container.offsetHeight - 2;
|
||||
SQL.Map = function (owner) {
|
||||
this.owner = owner;
|
||||
SQL.Visual.apply(this);
|
||||
this.dom.container = OZ.$("minimap");
|
||||
this.width = this.dom.container.offsetWidth - 2;
|
||||
this.height = this.dom.container.offsetHeight - 2;
|
||||
|
||||
this.dom.port = OZ.DOM.elm("div",{className:"port", zIndex:1});
|
||||
this.dom.container.appendChild(this.dom.port);
|
||||
this.sync = this.sync.bind(this);
|
||||
this.dom.port = OZ.DOM.elm("div", { className: "port", zIndex: 1 });
|
||||
this.dom.container.appendChild(this.dom.port);
|
||||
this.sync = this.sync.bind(this);
|
||||
|
||||
this.flag = false;
|
||||
this.sync();
|
||||
this.flag = false;
|
||||
this.sync();
|
||||
|
||||
OZ.Event.add(window, "resize", this.sync);
|
||||
OZ.Event.add(window, "scroll", this.sync);
|
||||
OZ.Event.add(this.dom.container, "mousedown", this.down.bind(this));
|
||||
OZ.Event.add(this.dom.container, "touchstart", this.down.bind(this));
|
||||
OZ.Event.add(this.dom.container, "touchmove", OZ.Event.prevent);
|
||||
}
|
||||
OZ.Event.add(window, "resize", this.sync);
|
||||
OZ.Event.add(window, "scroll", this.sync);
|
||||
OZ.Event.add(this.dom.container, "mousedown", this.down.bind(this));
|
||||
OZ.Event.add(this.dom.container, "touchstart", this.down.bind(this));
|
||||
OZ.Event.add(this.dom.container, "touchmove", OZ.Event.prevent);
|
||||
};
|
||||
SQL.Map.prototype = Object.create(SQL.Visual.prototype);
|
||||
|
||||
SQL.Map.prototype.down = function(e) { /* mousedown - move view and start drag */
|
||||
this.flag = true;
|
||||
this.dom.container.style.cursor = "move";
|
||||
var pos = OZ.DOM.pos(this.dom.container);
|
||||
SQL.Map.prototype.down = function (e) {
|
||||
/* mousedown - move view and start drag */
|
||||
this.flag = true;
|
||||
this.dom.container.style.cursor = "move";
|
||||
var pos = OZ.DOM.pos(this.dom.container);
|
||||
|
||||
this.x = Math.round(pos[0] + this.l + this.w/2);
|
||||
this.y = Math.round(pos[1] + this.t + this.h/2);
|
||||
this.move(e);
|
||||
this.x = Math.round(pos[0] + this.l + this.w / 2);
|
||||
this.y = Math.round(pos[1] + this.t + this.h / 2);
|
||||
this.move(e);
|
||||
|
||||
if (e.type == "touchstart") {
|
||||
var eventMove = "touchmove";
|
||||
var eventUp = "touchend";
|
||||
} else {
|
||||
var eventMove = "mousemove";
|
||||
var eventUp = "mouseup";
|
||||
}
|
||||
if (e.type == "touchstart") {
|
||||
var eventMove = "touchmove";
|
||||
var eventUp = "touchend";
|
||||
} else {
|
||||
var eventMove = "mousemove";
|
||||
var eventUp = "mouseup";
|
||||
}
|
||||
|
||||
this.documentMove = OZ.Event.add(document, eventMove, this.move.bind(this));
|
||||
this.documentUp = OZ.Event.add(document, eventUp, this.up.bind(this));
|
||||
}
|
||||
this.documentMove = OZ.Event.add(document, eventMove, this.move.bind(this));
|
||||
this.documentUp = OZ.Event.add(document, eventUp, this.up.bind(this));
|
||||
};
|
||||
|
||||
SQL.Map.prototype.move = function(e) { /* mousemove */
|
||||
if (!this.flag) { return; }
|
||||
OZ.Event.prevent(e);
|
||||
SQL.Map.prototype.move = function (e) {
|
||||
/* mousemove */
|
||||
if (!this.flag) {
|
||||
return;
|
||||
}
|
||||
OZ.Event.prevent(e);
|
||||
|
||||
if (e.type.match(/touch/)) {
|
||||
if (e.touches.length > 1) { return; }
|
||||
var event = e.touches[0];
|
||||
} else {
|
||||
var event = e;
|
||||
}
|
||||
if (e.type.match(/touch/)) {
|
||||
if (e.touches.length > 1) {
|
||||
return;
|
||||
}
|
||||
var event = e.touches[0];
|
||||
} else {
|
||||
var event = e;
|
||||
}
|
||||
|
||||
var dx = event.clientX - this.x;
|
||||
var dy = event.clientY - this.y;
|
||||
if (this.l + dx < 0) { dx = -this.l; }
|
||||
if (this.t + dy < 0) { dy = -this.t; }
|
||||
if (this.l + this.w + 4 + dx > this.width) { dx = this.width - 4 - this.l - this.w; }
|
||||
if (this.t + this.h + 4 + dy > this.height) { dy = this.height - 4 - this.t - this.h; }
|
||||
var dx = event.clientX - this.x;
|
||||
var dy = event.clientY - this.y;
|
||||
if (this.l + dx < 0) {
|
||||
dx = -this.l;
|
||||
}
|
||||
if (this.t + dy < 0) {
|
||||
dy = -this.t;
|
||||
}
|
||||
if (this.l + this.w + 4 + dx > this.width) {
|
||||
dx = this.width - 4 - this.l - this.w;
|
||||
}
|
||||
if (this.t + this.h + 4 + dy > this.height) {
|
||||
dy = this.height - 4 - this.t - this.h;
|
||||
}
|
||||
|
||||
this.x += dx;
|
||||
this.y += dy;
|
||||
|
||||
this.x += dx;
|
||||
this.y += dy;
|
||||
this.l += dx;
|
||||
this.t += dy;
|
||||
|
||||
this.l += dx;
|
||||
this.t += dy;
|
||||
var coefX = this.width / this.owner.width;
|
||||
var coefY = this.height / this.owner.height;
|
||||
var left = this.l / coefX;
|
||||
var top = this.t / coefY;
|
||||
|
||||
var coefX = this.width / this.owner.width;
|
||||
var coefY = this.height / this.owner.height;
|
||||
var left = this.l / coefX;
|
||||
var top = this.t / coefY;
|
||||
document.documentElement.scrollLeft = Math.round(left);
|
||||
document.documentElement.scrollTop = Math.round(top);
|
||||
|
||||
if (OZ.webkit) {
|
||||
document.body.scrollLeft = Math.round(left);
|
||||
document.body.scrollTop = Math.round(top);
|
||||
} else {
|
||||
document.documentElement.scrollLeft = Math.round(left);
|
||||
document.documentElement.scrollTop = Math.round(top);
|
||||
}
|
||||
this.redraw();
|
||||
};
|
||||
|
||||
this.redraw();
|
||||
}
|
||||
SQL.Map.prototype.up = function (e) {
|
||||
/* mouseup */
|
||||
this.flag = false;
|
||||
this.dom.container.style.cursor = "";
|
||||
OZ.Event.remove(this.documentMove);
|
||||
OZ.Event.remove(this.documentUp);
|
||||
};
|
||||
|
||||
SQL.Map.prototype.up = function(e) { /* mouseup */
|
||||
this.flag = false;
|
||||
this.dom.container.style.cursor = "";
|
||||
OZ.Event.remove(this.documentMove);
|
||||
OZ.Event.remove(this.documentUp);
|
||||
}
|
||||
SQL.Map.prototype.sync = function () {
|
||||
/* when window changes, adjust map */
|
||||
var dims = OZ.DOM.win();
|
||||
var scroll = OZ.DOM.scroll();
|
||||
var scaleX = this.width / this.owner.width;
|
||||
var scaleY = this.height / this.owner.height;
|
||||
|
||||
SQL.Map.prototype.sync = function() { /* when window changes, adjust map */
|
||||
var dims = OZ.DOM.win();
|
||||
var scroll = OZ.DOM.scroll();
|
||||
var scaleX = this.width / this.owner.width;
|
||||
var scaleY = this.height / this.owner.height;
|
||||
var w = dims[0] * scaleX - 4 - 0;
|
||||
var h = dims[1] * scaleY - 4 - 0;
|
||||
var x = scroll[0] * scaleX;
|
||||
var y = scroll[1] * scaleY;
|
||||
|
||||
var w = dims[0] * scaleX - 4 - 0;
|
||||
var h = dims[1] * scaleY - 4 - 0;
|
||||
var x = scroll[0] * scaleX;
|
||||
var y = scroll[1] * scaleY;
|
||||
this.w = Math.round(w);
|
||||
this.h = Math.round(h);
|
||||
this.l = Math.round(x);
|
||||
this.t = Math.round(y);
|
||||
|
||||
this.w = Math.round(w);
|
||||
this.h = Math.round(h);
|
||||
this.l = Math.round(x);
|
||||
this.t = Math.round(y);
|
||||
this.redraw();
|
||||
};
|
||||
|
||||
this.redraw();
|
||||
}
|
||||
|
||||
SQL.Map.prototype.redraw = function() {
|
||||
this.dom.port.style.width = this.w+"px";
|
||||
this.dom.port.style.height = this.h+"px";
|
||||
this.dom.port.style.left = this.l+"px";
|
||||
this.dom.port.style.top = this.t+"px";
|
||||
}
|
||||
SQL.Map.prototype.redraw = function () {
|
||||
this.dom.port.style.width = this.w + "px";
|
||||
this.dom.port.style.height = this.h + "px";
|
||||
this.dom.port.style.left = this.l + "px";
|
||||
this.dom.port.style.top = this.t + "px";
|
||||
};
|
||||
|
||||
@@ -1,76 +1,112 @@
|
||||
/* --------------------- options ------------ */
|
||||
|
||||
SQL.Options = function(owner) {
|
||||
this.owner = owner;
|
||||
this.dom = {
|
||||
container:OZ.$("opts"),
|
||||
btn:OZ.$("options")
|
||||
}
|
||||
this.dom.btn.value = _("options");
|
||||
this.save = this.save.bind(this);
|
||||
this.build();
|
||||
}
|
||||
SQL.Options = function (owner) {
|
||||
this.owner = owner;
|
||||
this.dom = {
|
||||
container: OZ.$("opts"),
|
||||
btn: OZ.$("options"),
|
||||
};
|
||||
this.dom.btn.value = _("options");
|
||||
this.save = this.save.bind(this);
|
||||
this.build();
|
||||
};
|
||||
|
||||
SQL.Options.prototype.build = function() {
|
||||
this.dom.optionlocale = OZ.$("optionlocale");
|
||||
this.dom.optiondb = OZ.$("optiondb");
|
||||
this.dom.optionsnap = OZ.$("optionsnap");
|
||||
this.dom.optionpattern = OZ.$("optionpattern");
|
||||
this.dom.optionhide = OZ.$("optionhide");
|
||||
this.dom.optionvector = OZ.$("optionvector");
|
||||
this.dom.optionshowsize = OZ.$("optionshowsize");
|
||||
this.dom.optionshowtype = OZ.$("optionshowtype");
|
||||
SQL.Options.prototype.build = function () {
|
||||
this.dom.optionlocale = OZ.$("optionlocale");
|
||||
this.dom.optiondb = OZ.$("optiondb");
|
||||
this.dom.optionsnap = OZ.$("optionsnap");
|
||||
this.dom.optionpattern = OZ.$("optionpattern");
|
||||
this.dom.optionstyle = OZ.$("optionstyle");
|
||||
this.dom.optionhide = OZ.$("optionhide");
|
||||
this.dom.optionvector = OZ.$("optionvector");
|
||||
this.dom.optionshowsize = OZ.$("optionshowsize");
|
||||
this.dom.optionshowtype = OZ.$("optionshowtype");
|
||||
|
||||
var ids = ["language","db","snap","pattern","hide","vector","showsize","showtype","optionsnapnotice","optionpatternnotice","optionsnotice"];
|
||||
for (var i=0;i<ids.length;i++) {
|
||||
var id = ids[i];
|
||||
var elm = OZ.$(id);
|
||||
elm.innerHTML = _(id);
|
||||
}
|
||||
var ids = [
|
||||
"language",
|
||||
"db",
|
||||
"snap",
|
||||
"pattern",
|
||||
"style",
|
||||
"hide",
|
||||
"vector",
|
||||
"showsize",
|
||||
"showtype",
|
||||
"optionsnapnotice",
|
||||
"optionpatternnotice",
|
||||
"optionsnotice",
|
||||
];
|
||||
for (var i = 0; i < ids.length; i++) {
|
||||
var id = ids[i];
|
||||
var elm = OZ.$(id);
|
||||
elm.innerHTML = _(id);
|
||||
}
|
||||
|
||||
var ls = CONFIG.AVAILABLE_LOCALES;
|
||||
OZ.DOM.clear(this.dom.optionlocale);
|
||||
for (var i=0;i<ls.length;i++) {
|
||||
var o = OZ.DOM.elm("option");
|
||||
o.value = ls[i];
|
||||
o.innerHTML = ls[i];
|
||||
this.dom.optionlocale.appendChild(o);
|
||||
if (this.owner.getOption("locale") == ls[i]) { this.dom.optionlocale.selectedIndex = i; }
|
||||
}
|
||||
var ls = CONFIG.AVAILABLE_LOCALES;
|
||||
OZ.DOM.clear(this.dom.optionlocale);
|
||||
for (var i = 0; i < ls.length; i++) {
|
||||
var o = OZ.DOM.elm("option");
|
||||
o.value = ls[i];
|
||||
o.innerHTML = ls[i];
|
||||
this.dom.optionlocale.appendChild(o);
|
||||
if (this.owner.getOption("locale") == ls[i]) {
|
||||
this.dom.optionlocale.selectedIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
var dbs = CONFIG.AVAILABLE_DBS;
|
||||
OZ.DOM.clear(this.dom.optiondb);
|
||||
for (var i=0;i<dbs.length;i++) {
|
||||
var o = OZ.DOM.elm("option");
|
||||
o.value = dbs[i];
|
||||
o.innerHTML = dbs[i];
|
||||
this.dom.optiondb.appendChild(o);
|
||||
if (this.owner.getOption("db") == dbs[i]) { this.dom.optiondb.selectedIndex = i; }
|
||||
}
|
||||
var dbs = CONFIG.AVAILABLE_DBS;
|
||||
OZ.DOM.clear(this.dom.optiondb);
|
||||
for (var i = 0; i < dbs.length; i++) {
|
||||
var o = OZ.DOM.elm("option");
|
||||
o.value = dbs[i];
|
||||
o.innerHTML = dbs[i];
|
||||
this.dom.optiondb.appendChild(o);
|
||||
if (this.owner.getOption("db") == dbs[i]) {
|
||||
this.dom.optiondb.selectedIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
var styles = CONFIG.STYLES;
|
||||
OZ.DOM.clear(this.dom.optionstyle);
|
||||
for (var i = 0; i < styles.length; i++) {
|
||||
var o = OZ.DOM.elm("option");
|
||||
o.value = styles[i];
|
||||
o.innerHTML = styles[i];
|
||||
this.dom.optionstyle.appendChild(o);
|
||||
if (this.owner.getOption("style") == styles[i]) {
|
||||
this.dom.optionstyle.selectedIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
OZ.Event.add(this.dom.btn, "click", this.click.bind(this));
|
||||
OZ.Event.add(this.dom.btn, "click", this.click.bind(this));
|
||||
|
||||
this.dom.container.parentNode.removeChild(this.dom.container);
|
||||
}
|
||||
this.dom.container.parentNode.removeChild(this.dom.container);
|
||||
};
|
||||
|
||||
SQL.Options.prototype.save = function() {
|
||||
this.owner.setOption("locale",this.dom.optionlocale.value);
|
||||
this.owner.setOption("db",this.dom.optiondb.value);
|
||||
this.owner.setOption("snap",this.dom.optionsnap.value);
|
||||
this.owner.setOption("pattern",this.dom.optionpattern.value);
|
||||
this.owner.setOption("hide",this.dom.optionhide.checked ? "1" : "");
|
||||
this.owner.setOption("vector",this.dom.optionvector.checked ? "1" : "");
|
||||
this.owner.setOption("showsize",this.dom.optionshowsize.checked ? "1" : "");
|
||||
this.owner.setOption("showtype",this.dom.optionshowtype.checked ? "1" : "");
|
||||
}
|
||||
SQL.Options.prototype.save = function () {
|
||||
this.owner.setOption("locale", this.dom.optionlocale.value);
|
||||
this.owner.setOption("db", this.dom.optiondb.value);
|
||||
this.owner.setOption("snap", this.dom.optionsnap.value);
|
||||
this.owner.setOption("pattern", this.dom.optionpattern.value);
|
||||
this.owner.setOption("style", this.dom.optionstyle.value);
|
||||
this.owner.setOption("hide", this.dom.optionhide.checked ? "1" : "");
|
||||
this.owner.setOption("vector", this.dom.optionvector.checked ? "1" : "");
|
||||
this.owner.setOption(
|
||||
"showsize",
|
||||
this.dom.optionshowsize.checked ? "1" : ""
|
||||
);
|
||||
this.owner.setOption(
|
||||
"showtype",
|
||||
this.dom.optionshowtype.checked ? "1" : ""
|
||||
);
|
||||
};
|
||||
|
||||
SQL.Options.prototype.click = function() {
|
||||
this.owner.window.open(_("options"),this.dom.container,this.save);
|
||||
this.dom.optionsnap.value = this.owner.getOption("snap");
|
||||
this.dom.optionpattern.value = this.owner.getOption("pattern");
|
||||
this.dom.optionhide.checked = this.owner.getOption("hide");
|
||||
this.dom.optionvector.checked = this.owner.getOption("vector");
|
||||
this.dom.optionshowsize.checked = this.owner.getOption("showsize");
|
||||
this.dom.optionshowtype.checked = this.owner.getOption("showtype");
|
||||
}
|
||||
SQL.Options.prototype.click = function () {
|
||||
this.owner.window.open(_("options"), this.dom.container, this.save);
|
||||
this.dom.optionsnap.value = this.owner.getOption("snap");
|
||||
this.dom.optionpattern.value = this.owner.getOption("pattern");
|
||||
this.dom.optionhide.checked = this.owner.getOption("hide");
|
||||
this.dom.optionvector.checked = this.owner.getOption("vector");
|
||||
this.dom.optionshowsize.checked = this.owner.getOption("showsize");
|
||||
this.dom.optionshowtype.checked = this.owner.getOption("showtype");
|
||||
};
|
||||
|
||||
@@ -1,334 +1,466 @@
|
||||
/* (c) 2007 - now() Ondrej Zara, 1.7 */
|
||||
var OZ = {
|
||||
$:function(x) { return typeof(x) == "string" ? document.getElementById(x) : x; },
|
||||
select: function(x) { return document.querySelectorAll(x); },
|
||||
opera:!!window.opera,
|
||||
ie:!!document.attachEvent && !window.opera,
|
||||
gecko:!!document.getAnonymousElementByAttribute,
|
||||
webkit:!!navigator.userAgent.match(/webkit/i),
|
||||
khtml:!!navigator.userAgent.match(/khtml/i) || !!navigator.userAgent.match(/konqueror/i),
|
||||
Event:{
|
||||
_id:0,
|
||||
_byName:{},
|
||||
_byID:{},
|
||||
add:function(elm,event,cb) {
|
||||
var id = OZ.Event._id++;
|
||||
var element = OZ.$(elm);
|
||||
var fnc = (element && element.attachEvent ? function() { return cb.apply(element,arguments); } : cb);
|
||||
var rec = [element,event,fnc];
|
||||
var parts = event.split(" ");
|
||||
while (parts.length) {
|
||||
var e = parts.pop();
|
||||
if (element) {
|
||||
if (element.addEventListener) {
|
||||
element.addEventListener(e,fnc,false);
|
||||
} else if (element.attachEvent) {
|
||||
element.attachEvent("on"+e,fnc);
|
||||
}
|
||||
}
|
||||
if (!(e in OZ.Event._byName)) { OZ.Event._byName[e] = {}; }
|
||||
OZ.Event._byName[e][id] = rec;
|
||||
}
|
||||
OZ.Event._byID[id] = rec;
|
||||
return id;
|
||||
},
|
||||
remove:function(id) {
|
||||
var rec = OZ.Event._byID[id];
|
||||
if (!rec) { return; }
|
||||
var elm = rec[0];
|
||||
var parts = rec[1].split(" ");
|
||||
while (parts.length) {
|
||||
var e = parts.pop();
|
||||
if (elm) {
|
||||
if (elm.removeEventListener) {
|
||||
elm.removeEventListener(e,rec[2],false);
|
||||
} else if (elm.detachEvent) {
|
||||
elm.detachEvent("on"+e,rec[2]);
|
||||
}
|
||||
}
|
||||
delete OZ.Event._byName[e][id];
|
||||
}
|
||||
delete OZ.Event._byID[id];
|
||||
},
|
||||
stop:function(e) { e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true; },
|
||||
prevent:function(e) { e.preventDefault ? e.preventDefault() : e.returnValue = false; },
|
||||
target:function(e) { return e.target || e.srcElement; }
|
||||
},
|
||||
Class:function() {
|
||||
var c = function() {
|
||||
var init = arguments.callee.prototype.init;
|
||||
if (init) { init.apply(this,arguments); }
|
||||
};
|
||||
c.implement = function(parent) {
|
||||
for (var p in parent.prototype) { this.prototype[p] = parent.prototype[p]; }
|
||||
return this;
|
||||
};
|
||||
c.extend = function(parent) {
|
||||
var tmp = function(){};
|
||||
tmp.prototype = parent.prototype;
|
||||
this.prototype = new tmp();
|
||||
this.prototype.constructor = this;
|
||||
return this;
|
||||
};
|
||||
c.prototype.bind = function(fnc) { return fnc.bind(this); };
|
||||
c.prototype.dispatch = function(type, data) {
|
||||
var obj = {
|
||||
type:type,
|
||||
target:this,
|
||||
timeStamp:(new Date()).getTime(),
|
||||
data:data
|
||||
}
|
||||
var tocall = [];
|
||||
var list = OZ.Event._byName[type];
|
||||
for (var id in list) {
|
||||
var item = list[id];
|
||||
if (!item[0] || item[0] == this) { tocall.push(item[2]); }
|
||||
}
|
||||
var len = tocall.length;
|
||||
for (var i=0;i<len;i++) { tocall[i](obj); }
|
||||
}
|
||||
return c;
|
||||
},
|
||||
DOM:{
|
||||
elm:function(name, opts) {
|
||||
var elm = document.createElement(name);
|
||||
for (var p in opts) {
|
||||
var val = opts[p];
|
||||
if (p == "class") { p = "className"; }
|
||||
if (p in elm) { elm[p] = val; }
|
||||
}
|
||||
OZ.Style.set(elm, opts);
|
||||
return elm;
|
||||
},
|
||||
text:function(str) { return document.createTextNode(str); },
|
||||
clear:function(node) { while (node.firstChild) {node.removeChild(node.firstChild);} },
|
||||
pos:function(elm) { /* relative to _viewport_ */
|
||||
var cur = OZ.$(elm);
|
||||
var html = cur.ownerDocument.documentElement;
|
||||
var parent = cur.parentNode;
|
||||
var x = y = 0;
|
||||
if (cur == html) { return [x,y]; }
|
||||
while (1) {
|
||||
if (OZ.Style.get(cur,"position") == "fixed") {
|
||||
x += cur.offsetLeft;
|
||||
y += cur.offsetTop;
|
||||
return [x,y];
|
||||
}
|
||||
$: function (x) {
|
||||
return typeof x == "string" ? document.getElementById(x) : x;
|
||||
},
|
||||
select: function (x) {
|
||||
return document.querySelectorAll(x);
|
||||
},
|
||||
opera: !!window.opera,
|
||||
ie: !!document.attachEvent && !window.opera,
|
||||
gecko: !!document.getAnonymousElementByAttribute,
|
||||
webkit: !!navigator.userAgent.match(/webkit/i),
|
||||
khtml:
|
||||
!!navigator.userAgent.match(/khtml/i) ||
|
||||
!!navigator.userAgent.match(/konqueror/i),
|
||||
Event: {
|
||||
_id: 0,
|
||||
_byName: {},
|
||||
_byID: {},
|
||||
add: function (elm, event, cb) {
|
||||
var id = OZ.Event._id++;
|
||||
var element = OZ.$(elm);
|
||||
var fnc =
|
||||
element && element.attachEvent
|
||||
? function () {
|
||||
return cb.apply(element, arguments);
|
||||
}
|
||||
: cb;
|
||||
var rec = [element, event, fnc];
|
||||
var parts = event.split(" ");
|
||||
while (parts.length) {
|
||||
var e = parts.pop();
|
||||
if (element) {
|
||||
if (element.addEventListener) {
|
||||
element.addEventListener(e, fnc, false);
|
||||
} else if (element.attachEvent) {
|
||||
element.attachEvent("on" + e, fnc);
|
||||
}
|
||||
}
|
||||
if (!(e in OZ.Event._byName)) {
|
||||
OZ.Event._byName[e] = {};
|
||||
}
|
||||
OZ.Event._byName[e][id] = rec;
|
||||
}
|
||||
OZ.Event._byID[id] = rec;
|
||||
return id;
|
||||
},
|
||||
remove: function (id) {
|
||||
var rec = OZ.Event._byID[id];
|
||||
if (!rec) {
|
||||
return;
|
||||
}
|
||||
var elm = rec[0];
|
||||
var parts = rec[1].split(" ");
|
||||
while (parts.length) {
|
||||
var e = parts.pop();
|
||||
if (elm) {
|
||||
if (elm.removeEventListener) {
|
||||
elm.removeEventListener(e, rec[2], false);
|
||||
} else if (elm.detachEvent) {
|
||||
elm.detachEvent("on" + e, rec[2]);
|
||||
}
|
||||
}
|
||||
delete OZ.Event._byName[e][id];
|
||||
}
|
||||
delete OZ.Event._byID[id];
|
||||
},
|
||||
stop: function (e) {
|
||||
e.stopPropagation ? e.stopPropagation() : (e.cancelBubble = true);
|
||||
},
|
||||
prevent: function (e) {
|
||||
e.preventDefault ? e.preventDefault() : (e.returnValue = false);
|
||||
},
|
||||
target: function (e) {
|
||||
return e.target || e.srcElement;
|
||||
},
|
||||
},
|
||||
Class: function () {
|
||||
var c = function () {
|
||||
var init = arguments.callee.prototype.init;
|
||||
if (init) {
|
||||
init.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
c.implement = function (parent) {
|
||||
for (var p in parent.prototype) {
|
||||
this.prototype[p] = parent.prototype[p];
|
||||
}
|
||||
return this;
|
||||
};
|
||||
c.extend = function (parent) {
|
||||
var tmp = function () {};
|
||||
tmp.prototype = parent.prototype;
|
||||
this.prototype = new tmp();
|
||||
this.prototype.constructor = this;
|
||||
return this;
|
||||
};
|
||||
c.prototype.bind = function (fnc) {
|
||||
return fnc.bind(this);
|
||||
};
|
||||
c.prototype.dispatch = function (type, data) {
|
||||
var obj = {
|
||||
type: type,
|
||||
target: this,
|
||||
timeStamp: new Date().getTime(),
|
||||
data: data,
|
||||
};
|
||||
var tocall = [];
|
||||
var list = OZ.Event._byName[type];
|
||||
for (var id in list) {
|
||||
var item = list[id];
|
||||
if (!item[0] || item[0] == this) {
|
||||
tocall.push(item[2]);
|
||||
}
|
||||
}
|
||||
var len = tocall.length;
|
||||
for (var i = 0; i < len; i++) {
|
||||
tocall[i](obj);
|
||||
}
|
||||
};
|
||||
return c;
|
||||
},
|
||||
DOM: {
|
||||
elm: function (name, opts) {
|
||||
var elm = document.createElement(name);
|
||||
for (var p in opts) {
|
||||
var val = opts[p];
|
||||
if (p == "class") {
|
||||
p = "className";
|
||||
}
|
||||
if (p in elm) {
|
||||
elm[p] = val;
|
||||
}
|
||||
}
|
||||
OZ.Style.set(elm, opts);
|
||||
return elm;
|
||||
},
|
||||
text: function (str) {
|
||||
return document.createTextNode(str);
|
||||
},
|
||||
clear: function (node) {
|
||||
while (node.firstChild) {
|
||||
node.removeChild(node.firstChild);
|
||||
}
|
||||
},
|
||||
pos: function (elm) {
|
||||
/* relative to _viewport_ */
|
||||
var cur = OZ.$(elm);
|
||||
var html = cur.ownerDocument.documentElement;
|
||||
var parent = cur.parentNode;
|
||||
var x = (y = 0);
|
||||
if (cur == html) {
|
||||
return [x, y];
|
||||
}
|
||||
while (1) {
|
||||
if (OZ.Style.get(cur, "position") == "fixed") {
|
||||
x += cur.offsetLeft;
|
||||
y += cur.offsetTop;
|
||||
return [x, y];
|
||||
}
|
||||
|
||||
if (OZ.opera && (parent == html || OZ.Style.get(cur,"display") != "block")) { } else {
|
||||
x -= parent.scrollLeft;
|
||||
y -= parent.scrollTop;
|
||||
}
|
||||
if (parent == cur.offsetParent || cur.parentNode == html) {
|
||||
x += cur.offsetLeft;
|
||||
y += cur.offsetTop;
|
||||
cur = parent;
|
||||
}
|
||||
if (
|
||||
OZ.opera &&
|
||||
(parent == html || OZ.Style.get(cur, "display") != "block")
|
||||
) {
|
||||
} else {
|
||||
x -= parent.scrollLeft;
|
||||
y -= parent.scrollTop;
|
||||
}
|
||||
if (parent == cur.offsetParent || cur.parentNode == html) {
|
||||
x += cur.offsetLeft;
|
||||
y += cur.offsetTop;
|
||||
cur = parent;
|
||||
}
|
||||
|
||||
if (parent == html) { return [x,y]; }
|
||||
parent = parent.parentNode;
|
||||
}
|
||||
},
|
||||
scroll:function() {
|
||||
var x = document.documentElement.scrollLeft || document.body.scrollLeft || 0;
|
||||
var y = document.documentElement.scrollTop || document.body.scrollTop || 0;
|
||||
return [x,y];
|
||||
},
|
||||
win:function(avail) {
|
||||
return (avail ? [window.innerWidth,window.innerHeight] : [document.documentElement.clientWidth,document.documentElement.clientHeight]);
|
||||
},
|
||||
hasClass:function(node, className) {
|
||||
var cn = OZ.$(node).className;
|
||||
var arr = (cn ? cn.split(" ") : []);
|
||||
return (arr.indexOf(className) != -1);
|
||||
},
|
||||
addClass:function(node,className) {
|
||||
if (OZ.DOM.hasClass(node, className)) { return; }
|
||||
var cn = OZ.$(node).className;
|
||||
var arr = (cn ? cn.split(" ") : []);
|
||||
arr.push(className);
|
||||
OZ.$(node).className = arr.join(" ");
|
||||
},
|
||||
removeClass:function(node, className) {
|
||||
if (!OZ.DOM.hasClass(node, className)) { return; }
|
||||
var cn = OZ.$(node).className;
|
||||
var arr = (cn ? cn.split(" ") : []);
|
||||
var arr = arr.filter(function($){ return $ != className; });
|
||||
OZ.$(node).className = arr.join(" ");
|
||||
},
|
||||
append:function() {
|
||||
if (arguments.length == 1) {
|
||||
var arr = arguments[0];
|
||||
var root = OZ.$(arr[0]);
|
||||
for (var i=1;i<arr.length;i++) { root.appendChild(OZ.$(arr[i])); }
|
||||
} else for (var i=0;i<arguments.length;i++) { OZ.DOM.append(arguments[i]); }
|
||||
}
|
||||
},
|
||||
Style:{
|
||||
get:function(elm, prop) {
|
||||
if (document.defaultView && document.defaultView.getComputedStyle) {
|
||||
try {
|
||||
var cs = elm.ownerDocument.defaultView.getComputedStyle(elm,"");
|
||||
} catch(e) {
|
||||
return false;
|
||||
}
|
||||
if (!cs) { return false; }
|
||||
return cs[prop];
|
||||
} else {
|
||||
return elm.currentStyle[prop];
|
||||
}
|
||||
},
|
||||
set:function(elm, obj) {
|
||||
for (var p in obj) {
|
||||
var val = obj[p];
|
||||
if (p == "opacity" && OZ.ie) {
|
||||
p = "filter";
|
||||
val = "alpha(opacity="+Math.round(100*val)+")";
|
||||
elm.style.zoom = 1;
|
||||
} else if (p == "float") {
|
||||
p = (OZ.ie ? "styleFloat" : "cssFloat");
|
||||
}
|
||||
if (p in elm.style) { elm.style[p] = val; }
|
||||
}
|
||||
}
|
||||
},
|
||||
Request:function(url, callback, options) {
|
||||
var o = {data:false, method:"get", headers:{}, xml:false}
|
||||
for (var p in options) { o[p] = options[p]; }
|
||||
o.method = o.method.toUpperCase();
|
||||
if (parent == html) {
|
||||
return [x, y];
|
||||
}
|
||||
parent = parent.parentNode;
|
||||
}
|
||||
},
|
||||
scroll: function () {
|
||||
var x =
|
||||
document.documentElement.scrollLeft ||
|
||||
document.body.scrollLeft ||
|
||||
0;
|
||||
var y =
|
||||
document.documentElement.scrollTop ||
|
||||
document.body.scrollTop ||
|
||||
0;
|
||||
return [x, y];
|
||||
},
|
||||
win: function (avail) {
|
||||
return avail
|
||||
? [window.innerWidth, window.innerHeight]
|
||||
: [
|
||||
document.documentElement.clientWidth,
|
||||
document.documentElement.clientHeight,
|
||||
];
|
||||
},
|
||||
hasClass: function (node, className) {
|
||||
var cn = OZ.$(node).className;
|
||||
var arr = cn ? cn.split(" ") : [];
|
||||
return arr.indexOf(className) != -1;
|
||||
},
|
||||
addClass: function (node, className) {
|
||||
if (OZ.DOM.hasClass(node, className)) {
|
||||
return;
|
||||
}
|
||||
var cn = OZ.$(node).className;
|
||||
var arr = cn ? cn.split(" ") : [];
|
||||
arr.push(className);
|
||||
OZ.$(node).className = arr.join(" ");
|
||||
},
|
||||
removeClass: function (node, className) {
|
||||
if (!OZ.DOM.hasClass(node, className)) {
|
||||
return;
|
||||
}
|
||||
var cn = OZ.$(node).className;
|
||||
var arr = cn ? cn.split(" ") : [];
|
||||
var arr = arr.filter(function ($) {
|
||||
return $ != className;
|
||||
});
|
||||
OZ.$(node).className = arr.join(" ");
|
||||
},
|
||||
append: function () {
|
||||
if (arguments.length == 1) {
|
||||
var arr = arguments[0];
|
||||
var root = OZ.$(arr[0]);
|
||||
for (var i = 1; i < arr.length; i++) {
|
||||
root.appendChild(OZ.$(arr[i]));
|
||||
}
|
||||
} else
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
OZ.DOM.append(arguments[i]);
|
||||
}
|
||||
},
|
||||
},
|
||||
Style: {
|
||||
get: function (elm, prop) {
|
||||
if (document.defaultView && document.defaultView.getComputedStyle) {
|
||||
try {
|
||||
var cs = elm.ownerDocument.defaultView.getComputedStyle(
|
||||
elm,
|
||||
""
|
||||
);
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
if (!cs) {
|
||||
return false;
|
||||
}
|
||||
return cs[prop];
|
||||
} else {
|
||||
return elm.currentStyle[prop];
|
||||
}
|
||||
},
|
||||
set: function (elm, obj) {
|
||||
for (var p in obj) {
|
||||
var val = obj[p];
|
||||
if (p == "opacity" && OZ.ie) {
|
||||
p = "filter";
|
||||
val = "alpha(opacity=" + Math.round(100 * val) + ")";
|
||||
elm.style.zoom = 1;
|
||||
} else if (p == "float") {
|
||||
p = OZ.ie ? "styleFloat" : "cssFloat";
|
||||
}
|
||||
if (p in elm.style) {
|
||||
elm.style[p] = val;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
Request: function (url, callback, options) {
|
||||
var o = { data: false, method: "get", headers: {}, xml: false };
|
||||
for (var p in options) {
|
||||
o[p] = options[p];
|
||||
}
|
||||
o.method = o.method.toUpperCase();
|
||||
|
||||
var xhr = false;
|
||||
if (window.XMLHttpRequest) { xhr = new XMLHttpRequest(); }
|
||||
else if (window.ActiveXObject) { xhr = new ActiveXObject("Microsoft.XMLHTTP"); }
|
||||
else { return false; }
|
||||
xhr.open(o.method, url, true);
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState != 4) { return; }
|
||||
if (!callback) { return; }
|
||||
var data = (o.xml ? xhr.responseXML : xhr.responseText);
|
||||
var headers = {};
|
||||
var h = xhr.getAllResponseHeaders();
|
||||
if (h) {
|
||||
h = h.split(/[\r\n]/);
|
||||
for (var i=0;i<h.length;i++) if (h[i]) {
|
||||
var v = h[i].match(/^([^:]+): *(.*)$/);
|
||||
headers[v[1]] = v[2];
|
||||
}
|
||||
}
|
||||
callback(data,xhr.status,headers);
|
||||
};
|
||||
if (o.method == "POST") { xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); }
|
||||
for (var p in o.headers) { xhr.setRequestHeader(p,o.headers[p]); }
|
||||
xhr.send(o.data || null);
|
||||
return xhr;
|
||||
}
|
||||
}
|
||||
|
||||
if (!Function.prototype.bind) {
|
||||
Function.prototype.bind = function(thisObj) {
|
||||
var fn = this;
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
return function() {
|
||||
return fn.apply(thisObj, args.concat(Array.prototype.slice.call(arguments)));
|
||||
}
|
||||
}
|
||||
var xhr = false;
|
||||
if (window.XMLHttpRequest) {
|
||||
xhr = new XMLHttpRequest();
|
||||
} else if (window.ActiveXObject) {
|
||||
xhr = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
xhr.open(o.method, url, true);
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState != 4) {
|
||||
return;
|
||||
}
|
||||
if (!callback) {
|
||||
return;
|
||||
}
|
||||
var data = o.xml ? xhr.responseXML : xhr.responseText;
|
||||
var headers = {};
|
||||
var h = xhr.getAllResponseHeaders();
|
||||
if (h) {
|
||||
h = h.split(/[\r\n]/);
|
||||
for (var i = 0; i < h.length; i++)
|
||||
if (h[i]) {
|
||||
var v = h[i].match(/^([^:]+): *(.*)$/);
|
||||
headers[v[1]] = v[2];
|
||||
}
|
||||
}
|
||||
callback(data, xhr.status, headers);
|
||||
};
|
||||
if (o.method == "POST") {
|
||||
xhr.setRequestHeader(
|
||||
"Content-Type",
|
||||
"application/x-www-form-urlencoded"
|
||||
);
|
||||
}
|
||||
for (var p in o.headers) {
|
||||
xhr.setRequestHeader(p, o.headers[p]);
|
||||
}
|
||||
xhr.send(o.data || null);
|
||||
return xhr;
|
||||
},
|
||||
};
|
||||
|
||||
if (!Function.prototype.bind) {
|
||||
Function.prototype.bind = function (thisObj) {
|
||||
var fn = this;
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
return function () {
|
||||
return fn.apply(
|
||||
thisObj,
|
||||
args.concat(Array.prototype.slice.call(arguments))
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
if (!Array.prototype.indexOf) {
|
||||
Array.prototype.indexOf = function(item, from) {
|
||||
var len = this.length;
|
||||
var i = from || 0;
|
||||
if (i < 0) { i += len; }
|
||||
for (;i<len;i++) {
|
||||
if (i in this && this[i] === item) { return i; }
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
Array.prototype.indexOf = function (item, from) {
|
||||
var len = this.length;
|
||||
var i = from || 0;
|
||||
if (i < 0) {
|
||||
i += len;
|
||||
}
|
||||
for (; i < len; i++) {
|
||||
if (i in this && this[i] === item) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
}
|
||||
if (!Array.indexOf) {
|
||||
Array.indexOf = function(obj, item, from) { return Array.prototype.indexOf.call(obj, item, from); }
|
||||
Array.indexOf = function (obj, item, from) {
|
||||
return Array.prototype.indexOf.call(obj, item, from);
|
||||
};
|
||||
}
|
||||
|
||||
if (!Array.prototype.lastIndexOf) {
|
||||
Array.prototype.lastIndexOf = function(item, from) {
|
||||
var len = this.length;
|
||||
var i = from || len-1;
|
||||
if (i < 0) { i += len; }
|
||||
for (;i>-1;i--) {
|
||||
if (i in this && this[i] === item) { return i; }
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
Array.prototype.lastIndexOf = function (item, from) {
|
||||
var len = this.length;
|
||||
var i = from || len - 1;
|
||||
if (i < 0) {
|
||||
i += len;
|
||||
}
|
||||
for (; i > -1; i--) {
|
||||
if (i in this && this[i] === item) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
}
|
||||
if (!Array.lastIndexOf) {
|
||||
Array.lastIndexOf = function(obj, item, from) { return Array.prototype.lastIndexOf.call(obj, item, from); }
|
||||
Array.lastIndexOf = function (obj, item, from) {
|
||||
return Array.prototype.lastIndexOf.call(obj, item, from);
|
||||
};
|
||||
}
|
||||
|
||||
if (!Array.prototype.forEach) {
|
||||
Array.prototype.forEach = function(cb, _this) {
|
||||
var len = this.length;
|
||||
for (var i=0;i<len;i++) {
|
||||
if (i in this) { cb.call(_this, this[i], i, this); }
|
||||
}
|
||||
}
|
||||
Array.prototype.forEach = function (cb, _this) {
|
||||
var len = this.length;
|
||||
for (var i = 0; i < len; i++) {
|
||||
if (i in this) {
|
||||
cb.call(_this, this[i], i, this);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
if (!Array.forEach) {
|
||||
Array.forEach = function(obj, cb, _this) { Array.prototype.forEach.call(obj, cb, _this); }
|
||||
Array.forEach = function (obj, cb, _this) {
|
||||
Array.prototype.forEach.call(obj, cb, _this);
|
||||
};
|
||||
}
|
||||
|
||||
if (!Array.prototype.every) {
|
||||
Array.prototype.every = function(cb, _this) {
|
||||
var len = this.length;
|
||||
for (var i=0;i<len;i++) {
|
||||
if (i in this && !cb.call(_this, this[i], i, this)) { return false; }
|
||||
}
|
||||
return true;
|
||||
}
|
||||
Array.prototype.every = function (cb, _this) {
|
||||
var len = this.length;
|
||||
for (var i = 0; i < len; i++) {
|
||||
if (i in this && !cb.call(_this, this[i], i, this)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
}
|
||||
if (!Array.every) {
|
||||
Array.every = function(obj, cb, _this) { return Array.prototype.every.call(obj, cb, _this); }
|
||||
Array.every = function (obj, cb, _this) {
|
||||
return Array.prototype.every.call(obj, cb, _this);
|
||||
};
|
||||
}
|
||||
|
||||
if (!Array.prototype.some) {
|
||||
Array.prototype.some = function(cb, _this) {
|
||||
var len = this.length;
|
||||
for (var i=0;i<len;i++) {
|
||||
if (i in this && cb.call(_this, this[i], i, this)) { return true; }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Array.prototype.some = function (cb, _this) {
|
||||
var len = this.length;
|
||||
for (var i = 0; i < len; i++) {
|
||||
if (i in this && cb.call(_this, this[i], i, this)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
}
|
||||
if (!Array.some) {
|
||||
Array.some = function(obj, cb, _this) { return Array.prototype.some.call(obj, cb, _this); }
|
||||
Array.some = function (obj, cb, _this) {
|
||||
return Array.prototype.some.call(obj, cb, _this);
|
||||
};
|
||||
}
|
||||
|
||||
if (!Array.prototype.map) {
|
||||
Array.prototype.map = function(cb, _this) {
|
||||
var len = this.length;
|
||||
var res = new Array(len);
|
||||
for (var i=0;i<len;i++) {
|
||||
if (i in this) { res[i] = cb.call(_this, this[i], i, this); }
|
||||
}
|
||||
return res;
|
||||
}
|
||||
Array.prototype.map = function (cb, _this) {
|
||||
var len = this.length;
|
||||
var res = new Array(len);
|
||||
for (var i = 0; i < len; i++) {
|
||||
if (i in this) {
|
||||
res[i] = cb.call(_this, this[i], i, this);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
};
|
||||
}
|
||||
if (!Array.map) {
|
||||
Array.map = function(obj, cb, _this) { return Array.prototype.map.call(obj, cb, _this); }
|
||||
Array.map = function (obj, cb, _this) {
|
||||
return Array.prototype.map.call(obj, cb, _this);
|
||||
};
|
||||
}
|
||||
|
||||
if (!Array.prototype.filter) {
|
||||
Array.prototype.filter = function(cb, _this) {
|
||||
var len = this.length;
|
||||
var res = [];
|
||||
for (var i=0;i<len;i++) {
|
||||
if (i in this) {
|
||||
var val = this[i];
|
||||
if (cb.call(_this, val, i, this)) { res.push(val); }
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
Array.prototype.filter = function (cb, _this) {
|
||||
var len = this.length;
|
||||
var res = [];
|
||||
for (var i = 0; i < len; i++) {
|
||||
if (i in this) {
|
||||
var val = this[i];
|
||||
if (cb.call(_this, val, i, this)) {
|
||||
res.push(val);
|
||||
}
|
||||
}
|
||||
}
|
||||
return res;
|
||||
};
|
||||
}
|
||||
if (!Array.filter) {
|
||||
Array.filter = function(obj, cb, _this) { return Array.prototype.filter.call(obj, cb, _this); }
|
||||
Array.filter = function (obj, cb, _this) {
|
||||
return Array.prototype.filter.call(obj, cb, _this);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,158 +1,234 @@
|
||||
/* --------------------------- relation (connector) ----------- */
|
||||
|
||||
SQL.Relation = function(owner, row1, row2) {
|
||||
this.owner = owner;
|
||||
this.row1 = row1;
|
||||
this.row2 = row2;
|
||||
this.color = "#000";
|
||||
this.hidden = false;
|
||||
SQL.Visual.apply(this);
|
||||
SQL.Relation = function (owner, row1, row2) {
|
||||
this.owner = owner;
|
||||
this.row1 = row1;
|
||||
this.row2 = row2;
|
||||
this.color = "#000";
|
||||
this.hidden = false;
|
||||
this.relationColors = CONFIG.RELATION_COLORS;
|
||||
this.highlighted = null;
|
||||
SQL.Visual.apply(this);
|
||||
|
||||
/* if one of the rows already has relations, inherit color */
|
||||
var all = row1.relations.concat(row2.relations);
|
||||
if (all.length) { /* inherit */
|
||||
this.color = all[0].getColor();
|
||||
} else if (CONFIG.RELATION_COLORS) { /* pick next */
|
||||
SQL.Relation._counter++;
|
||||
var colorIndex = SQL.Relation._counter - 1;
|
||||
this.color = CONFIG.RELATION_COLORS[colorIndex % CONFIG.RELATION_COLORS.length];
|
||||
}
|
||||
this.style = SQL.Designer.getOption("style");
|
||||
switch (this.style) {
|
||||
case "material-inspired":
|
||||
this.relationColors = CONFIG.MATERIAL_RELATION_COLORS;
|
||||
break;
|
||||
case "original":
|
||||
default:
|
||||
this.relationColors = CONFIG.RELATION_COLORS;
|
||||
}
|
||||
|
||||
this.row1.addRelation(this);
|
||||
this.row2.addRelation(this);
|
||||
this.dom = [];
|
||||
/* if one of the rows already has relations, inherit color */
|
||||
var all = row1.relations.concat(row2.relations);
|
||||
if (all.length) {
|
||||
/* inherit */
|
||||
this.color = all[0].getColor();
|
||||
} else if (this.relationColors) {
|
||||
/* pick next */
|
||||
SQL.Relation._counter++;
|
||||
var colorIndex =
|
||||
(SQL.Relation._counter - 1) % this.relationColors.length;
|
||||
this.color = this.relationColors[colorIndex];
|
||||
}
|
||||
|
||||
if (this.owner.vector) {
|
||||
var path = document.createElementNS(this.owner.svgNS, "path");
|
||||
path.setAttribute("stroke", this.color);
|
||||
path.setAttribute("stroke-width", CONFIG.RELATION_THICKNESS);
|
||||
path.setAttribute("fill", "none");
|
||||
this.owner.dom.svg.appendChild(path);
|
||||
this.dom.push(path);
|
||||
} else {
|
||||
for (var i=0;i<3;i++) {
|
||||
var div = OZ.DOM.elm("div",{position:"absolute",className:"relation",backgroundColor:this.color});
|
||||
this.dom.push(div);
|
||||
if (i & 1) { /* middle */
|
||||
OZ.Style.set(div, {width:CONFIG.RELATION_THICKNESS+"px"});
|
||||
} else { /* first & last */
|
||||
OZ.Style.set(div, {height:CONFIG.RELATION_THICKNESS+"px"});
|
||||
}
|
||||
this.owner.dom.container.appendChild(div);
|
||||
}
|
||||
}
|
||||
this.row1.addRelation(this);
|
||||
this.row2.addRelation(this);
|
||||
this.dom = [];
|
||||
|
||||
this.redraw();
|
||||
}
|
||||
if (this.owner.vector) {
|
||||
var path = document.createElementNS(this.owner.svgNS, "path");
|
||||
path.setAttribute("stroke", this.color);
|
||||
path.setAttribute("stroke-width", CONFIG.RELATION_THICKNESS);
|
||||
path.setAttribute("fill", "none");
|
||||
this.owner.dom.svg.appendChild(path);
|
||||
this.dom.push(path);
|
||||
} else {
|
||||
for (var i = 0; i < 3; i++) {
|
||||
var div = OZ.DOM.elm("div", {
|
||||
position: "absolute",
|
||||
className: "relation",
|
||||
backgroundColor: this.color,
|
||||
});
|
||||
this.dom.push(div);
|
||||
if (i & 1) {
|
||||
/* middle */
|
||||
OZ.Style.set(div, { width: CONFIG.RELATION_THICKNESS + "px" });
|
||||
} else {
|
||||
/* first & last */
|
||||
OZ.Style.set(div, { height: CONFIG.RELATION_THICKNESS + "px" });
|
||||
}
|
||||
this.owner.dom.container.appendChild(div);
|
||||
}
|
||||
}
|
||||
|
||||
this.redraw();
|
||||
};
|
||||
SQL.Relation._counter = 0;
|
||||
SQL.Relation.prototype = Object.create(SQL.Visual.prototype);
|
||||
|
||||
SQL.Relation.prototype.getColor = function() {
|
||||
return this.color;
|
||||
}
|
||||
SQL.Relation.prototype.getColor = function () {
|
||||
return this.color;
|
||||
};
|
||||
|
||||
SQL.Relation.prototype.show = function() {
|
||||
this.hidden = false;
|
||||
for (var i=0;i<this.dom.length;i++) {
|
||||
this.dom[i].style.visibility = "";
|
||||
}
|
||||
}
|
||||
SQL.Relation.prototype.highlight = function () {
|
||||
if (this.highlighted) {
|
||||
return;
|
||||
}
|
||||
this.highlighted = true;
|
||||
this.dom[0].setAttribute("stroke", CONFIG.RELATION_HIGHLIGHTED_COLOR);
|
||||
this.dom[0].setAttribute(
|
||||
"stroke-width",
|
||||
CONFIG.RELATION_HIGHLIGHTED_THICKNESS
|
||||
);
|
||||
this.redraw();
|
||||
};
|
||||
|
||||
SQL.Relation.prototype.hide = function() {
|
||||
this.hidden = true;
|
||||
for (var i=0;i<this.dom.length;i++) {
|
||||
this.dom[i].style.visibility = "hidden";
|
||||
}
|
||||
}
|
||||
SQL.Relation.prototype.dehighlight = function () {
|
||||
if (!this.highlighted) {
|
||||
return;
|
||||
}
|
||||
this.highlighted = false;
|
||||
this.dom[0].setAttribute("stroke", this.color);
|
||||
this.dom[0].setAttribute("stroke-width", CONFIG.RELATION_THICKNESS);
|
||||
this.redraw();
|
||||
};
|
||||
|
||||
SQL.Relation.prototype.redrawNormal = function(p1, p2, half) {
|
||||
if (this.owner.vector) {
|
||||
var str = "M "+p1[0]+" "+p1[1]+" C "+(p1[0] + half)+" "+p1[1]+" ";
|
||||
str += (p2[0]-half)+" "+p2[1]+" "+p2[0]+" "+p2[1];
|
||||
this.dom[0].setAttribute("d",str);
|
||||
} else {
|
||||
this.dom[0].style.left = p1[0]+"px";
|
||||
this.dom[0].style.top = p1[1]+"px";
|
||||
this.dom[0].style.width = half+"px";
|
||||
SQL.Relation.prototype.show = function () {
|
||||
this.hidden = false;
|
||||
for (var i = 0; i < this.dom.length; i++) {
|
||||
this.dom[i].style.visibility = "";
|
||||
}
|
||||
};
|
||||
|
||||
this.dom[1].style.left = (p1[0] + half) + "px";
|
||||
this.dom[1].style.top = Math.min(p1[1],p2[1]) + "px";
|
||||
this.dom[1].style.height = (Math.abs(p1[1] - p2[1])+CONFIG.RELATION_THICKNESS)+"px";
|
||||
SQL.Relation.prototype.hide = function () {
|
||||
this.hidden = true;
|
||||
for (var i = 0; i < this.dom.length; i++) {
|
||||
this.dom[i].style.visibility = "hidden";
|
||||
}
|
||||
};
|
||||
|
||||
this.dom[2].style.left = (p1[0]+half+1)+"px";
|
||||
this.dom[2].style.top = p2[1]+"px";
|
||||
this.dom[2].style.width = half+"px";
|
||||
}
|
||||
}
|
||||
SQL.Relation.prototype.redrawNormal = function (p1, p2, half) {
|
||||
if (this.owner.vector) {
|
||||
var str =
|
||||
"M " +
|
||||
p1[0] +
|
||||
" " +
|
||||
p1[1] +
|
||||
" C " +
|
||||
(p1[0] + half) +
|
||||
" " +
|
||||
p1[1] +
|
||||
" ";
|
||||
str += p2[0] - half + " " + p2[1] + " " + p2[0] + " " + p2[1];
|
||||
this.dom[0].setAttribute("d", str);
|
||||
} else {
|
||||
this.dom[0].style.left = p1[0] + "px";
|
||||
this.dom[0].style.top = p1[1] + "px";
|
||||
this.dom[0].style.width = half + "px";
|
||||
|
||||
SQL.Relation.prototype.redrawSide = function(p1, p2, x) {
|
||||
if (this.owner.vector) {
|
||||
var str = "M "+p1[0]+" "+p1[1]+" C "+x+" "+p1[1]+" ";
|
||||
str += x+" "+p2[1]+" "+p2[0]+" "+p2[1];
|
||||
this.dom[0].setAttribute("d",str);
|
||||
} else {
|
||||
this.dom[0].style.left = Math.min(x,p1[0])+"px";
|
||||
this.dom[0].style.top = p1[1]+"px";
|
||||
this.dom[0].style.width = Math.abs(p1[0]-x)+"px";
|
||||
this.dom[1].style.left = p1[0] + half + "px";
|
||||
this.dom[1].style.top = Math.min(p1[1], p2[1]) + "px";
|
||||
this.dom[1].style.height =
|
||||
Math.abs(p1[1] - p2[1]) + CONFIG.RELATION_THICKNESS + "px";
|
||||
|
||||
this.dom[1].style.left = x+"px";
|
||||
this.dom[1].style.top = Math.min(p1[1],p2[1]) + "px";
|
||||
this.dom[1].style.height = (Math.abs(p1[1] - p2[1])+CONFIG.RELATION_THICKNESS)+"px";
|
||||
this.dom[2].style.left = p1[0] + half + 1 + "px";
|
||||
this.dom[2].style.top = p2[1] + "px";
|
||||
this.dom[2].style.width = half + "px";
|
||||
}
|
||||
};
|
||||
|
||||
this.dom[2].style.left = Math.min(x,p2[0])+"px";
|
||||
this.dom[2].style.top = p2[1]+"px";
|
||||
this.dom[2].style.width = Math.abs(p2[0]-x)+"px";
|
||||
}
|
||||
}
|
||||
SQL.Relation.prototype.redrawSide = function (p1, p2, x) {
|
||||
if (this.owner.vector) {
|
||||
var str = "M " + p1[0] + " " + p1[1] + " C " + x + " " + p1[1] + " ";
|
||||
str += x + " " + p2[1] + " " + p2[0] + " " + p2[1];
|
||||
this.dom[0].setAttribute("d", str);
|
||||
} else {
|
||||
this.dom[0].style.left = Math.min(x, p1[0]) + "px";
|
||||
this.dom[0].style.top = p1[1] + "px";
|
||||
this.dom[0].style.width = Math.abs(p1[0] - x) + "px";
|
||||
|
||||
SQL.Relation.prototype.redraw = function() { /* draw connector */
|
||||
if (this.hidden) { return; }
|
||||
var t1 = this.row1.owner.dom.container;
|
||||
var t2 = this.row2.owner.dom.container;
|
||||
this.dom[1].style.left = x + "px";
|
||||
this.dom[1].style.top = Math.min(p1[1], p2[1]) + "px";
|
||||
this.dom[1].style.height =
|
||||
Math.abs(p1[1] - p2[1]) + CONFIG.RELATION_THICKNESS + "px";
|
||||
|
||||
var l1 = t1.offsetLeft;
|
||||
var l2 = t2.offsetLeft;
|
||||
var r1 = l1 + t1.offsetWidth;
|
||||
var r2 = l2 + t2.offsetWidth;
|
||||
var t1 = t1.offsetTop + this.row1.dom.container.offsetTop + Math.round(this.row1.dom.container.offsetHeight/2);
|
||||
var t2 = t2.offsetTop + this.row2.dom.container.offsetTop + Math.round(this.row2.dom.container.offsetHeight/2);
|
||||
this.dom[2].style.left = Math.min(x, p2[0]) + "px";
|
||||
this.dom[2].style.top = p2[1] + "px";
|
||||
this.dom[2].style.width = Math.abs(p2[0] - x) + "px";
|
||||
}
|
||||
};
|
||||
|
||||
if (this.row1.owner.selected) { t1++; l1++; r1--; }
|
||||
if (this.row2.owner.selected) { t2++; l2++; r2--; }
|
||||
SQL.Relation.prototype.redraw = function () {
|
||||
/* draw connector */
|
||||
if (this.hidden) {
|
||||
return;
|
||||
}
|
||||
var t1 = this.row1.owner.dom.container;
|
||||
var t2 = this.row2.owner.dom.container;
|
||||
|
||||
var p1 = [0,0];
|
||||
var p2 = [0,0];
|
||||
var l1 = t1.offsetLeft;
|
||||
var l2 = t2.offsetLeft;
|
||||
var r1 = l1 + t1.offsetWidth;
|
||||
var r2 = l2 + t2.offsetWidth;
|
||||
var t1 =
|
||||
t1.offsetTop +
|
||||
this.row1.dom.container.offsetTop +
|
||||
Math.round(this.row1.dom.container.offsetHeight / 2);
|
||||
var t2 =
|
||||
t2.offsetTop +
|
||||
this.row2.dom.container.offsetTop +
|
||||
Math.round(this.row2.dom.container.offsetHeight / 2);
|
||||
|
||||
if (r1 < l2 || r2 < l1) { /* between tables */
|
||||
if (Math.abs(r1 - l2) < Math.abs(r2 - l1)) {
|
||||
p1 = [r1,t1];
|
||||
p2 = [l2,t2];
|
||||
} else {
|
||||
p1 = [r2,t2];
|
||||
p2 = [l1,t1];
|
||||
}
|
||||
var half = Math.floor((p2[0] - p1[0])/2);
|
||||
this.redrawNormal(p1, p2, half);
|
||||
} else { /* next to tables */
|
||||
var x = 0;
|
||||
var l = 0;
|
||||
if (Math.abs(l1 - l2) < Math.abs(r1 - r2)) { /* left of tables */
|
||||
p1 = [l1,t1];
|
||||
p2 = [l2,t2];
|
||||
x = Math.min(l1,l2) - CONFIG.RELATION_SPACING;
|
||||
} else { /* right of tables */
|
||||
p1 = [r1,t1];
|
||||
p2 = [r2,t2];
|
||||
x = Math.max(r1,r2) + CONFIG.RELATION_SPACING;
|
||||
}
|
||||
this.redrawSide(p1, p2, x);
|
||||
} /* line next to tables */
|
||||
}
|
||||
if (this.row1.owner.selected) {
|
||||
t1++;
|
||||
l1++;
|
||||
r1--;
|
||||
}
|
||||
if (this.row2.owner.selected) {
|
||||
t2++;
|
||||
l2++;
|
||||
r2--;
|
||||
}
|
||||
|
||||
SQL.Relation.prototype.destroy = function() {
|
||||
this.row1.removeRelation(this);
|
||||
this.row2.removeRelation(this);
|
||||
for (var i=0;i<this.dom.length;i++) {
|
||||
this.dom[i].parentNode.removeChild(this.dom[i]);
|
||||
}
|
||||
}
|
||||
var p1 = [0, 0];
|
||||
var p2 = [0, 0];
|
||||
|
||||
if (r1 < l2 || r2 < l1) {
|
||||
/* between tables */
|
||||
if (Math.abs(r1 - l2) < Math.abs(r2 - l1)) {
|
||||
p1 = [r1, t1];
|
||||
p2 = [l2, t2];
|
||||
} else {
|
||||
p1 = [r2, t2];
|
||||
p2 = [l1, t1];
|
||||
}
|
||||
var half = Math.floor((p2[0] - p1[0]) / 2);
|
||||
this.redrawNormal(p1, p2, half);
|
||||
} else {
|
||||
/* next to tables */
|
||||
var x = 0;
|
||||
var l = 0;
|
||||
if (Math.abs(l1 - l2) < Math.abs(r1 - r2)) {
|
||||
/* left of tables */
|
||||
p1 = [l1, t1];
|
||||
p2 = [l2, t2];
|
||||
x = Math.min(l1, l2) - CONFIG.RELATION_SPACING;
|
||||
} else {
|
||||
/* right of tables */
|
||||
p1 = [r1, t1];
|
||||
p2 = [r2, t2];
|
||||
x = Math.max(r1, r2) + CONFIG.RELATION_SPACING;
|
||||
}
|
||||
this.redrawSide(p1, p2, x);
|
||||
} /* line next to tables */
|
||||
};
|
||||
|
||||
SQL.Relation.prototype.destroy = function () {
|
||||
this.row1.removeRelation(this);
|
||||
this.row2.removeRelation(this);
|
||||
for (var i = 0; i < this.dom.length; i++) {
|
||||
this.dom[i].parentNode.removeChild(this.dom[i]);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,424 +1,513 @@
|
||||
/* --------------------- table row ( = db column) ------------ */
|
||||
SQL.Row = function(owner, title, data) {
|
||||
this.owner = owner;
|
||||
this.relations = [];
|
||||
this.keys = [];
|
||||
this.selected = false;
|
||||
this.expanded = false;
|
||||
SQL.Row = function (owner, title, data) {
|
||||
this.owner = owner;
|
||||
this.relations = [];
|
||||
this.keys = [];
|
||||
this.selected = false;
|
||||
this.expanded = false;
|
||||
|
||||
SQL.Visual.apply(this);
|
||||
SQL.Visual.apply(this);
|
||||
|
||||
this.data.type = 0;
|
||||
this.data.size = "";
|
||||
this.data.def = null;
|
||||
this.data.nll = true;
|
||||
this.data.ai = false;
|
||||
this.data.comment = "";
|
||||
this.data.type = 0;
|
||||
this.data.size = "";
|
||||
this.data.def = null;
|
||||
this.data.nll = true;
|
||||
this.data.ai = false;
|
||||
this.data.comment = "";
|
||||
|
||||
if (data) { this.update(data); }
|
||||
this.setTitle(title);
|
||||
}
|
||||
if (data) {
|
||||
this.update(data);
|
||||
}
|
||||
this.setTitle(title);
|
||||
};
|
||||
SQL.Row.prototype = Object.create(SQL.Visual.prototype);
|
||||
|
||||
SQL.Row.prototype._build = function() {
|
||||
this.dom.container = OZ.DOM.elm("tbody");
|
||||
SQL.Row.prototype._build = function () {
|
||||
this.dom.container = OZ.DOM.elm("tbody");
|
||||
|
||||
this.dom.content = OZ.DOM.elm("tr");
|
||||
this.dom.selected = OZ.DOM.elm("div", {className:"selected",innerHTML:"» "});
|
||||
this.dom.title = OZ.DOM.elm("div", {className:"title"});
|
||||
var td1 = OZ.DOM.elm("td");
|
||||
var td2 = OZ.DOM.elm("td", {className:"typehint"});
|
||||
this.dom.typehint = td2;
|
||||
this.dom.content = OZ.DOM.elm("tr");
|
||||
this.dom.selected = OZ.DOM.elm("div", {
|
||||
className: "selected",
|
||||
innerHTML: "» ",
|
||||
});
|
||||
this.dom.title = OZ.DOM.elm("div", { className: "title" });
|
||||
var td1 = OZ.DOM.elm("td");
|
||||
var td2 = OZ.DOM.elm("td", { className: "typehint" });
|
||||
this.dom.typehint = td2;
|
||||
|
||||
OZ.DOM.append(
|
||||
[this.dom.container, this.dom.content],
|
||||
[this.dom.content, td1, td2],
|
||||
[td1, this.dom.selected, this.dom.title]
|
||||
);
|
||||
OZ.DOM.append(
|
||||
[this.dom.container, this.dom.content],
|
||||
[this.dom.content, td1, td2],
|
||||
[td1, this.dom.selected, this.dom.title]
|
||||
);
|
||||
|
||||
this.enter = this.enter.bind(this);
|
||||
this.changeComment = this.changeComment.bind(this);
|
||||
this.enter = this.enter.bind(this);
|
||||
this.changeComment = this.changeComment.bind(this);
|
||||
|
||||
OZ.Event.add(this.dom.container, "click",this.click.bind(this));
|
||||
OZ.Event.add(this.dom.container, "dblclick",this.dblclick.bind(this));
|
||||
}
|
||||
OZ.Event.add(this.dom.container, "click", this.click.bind(this));
|
||||
OZ.Event.add(this.dom.container, "dblclick", this.dblclick.bind(this));
|
||||
};
|
||||
|
||||
SQL.Row.prototype.select = function() {
|
||||
if (this.selected) { return; }
|
||||
this.selected = true;
|
||||
this.redraw();
|
||||
}
|
||||
SQL.Row.prototype.select = function () {
|
||||
if (this.selected) {
|
||||
return;
|
||||
}
|
||||
this.selected = true;
|
||||
for (var i = 0; i < this.relations.length; i++) {
|
||||
this.relations[i].highlight();
|
||||
}
|
||||
this.redraw();
|
||||
};
|
||||
|
||||
SQL.Row.prototype.deselect = function() {
|
||||
if (!this.selected) { return; }
|
||||
this.selected = false;
|
||||
this.redraw();
|
||||
this.collapse();
|
||||
}
|
||||
SQL.Row.prototype.deselect = function () {
|
||||
if (!this.selected) {
|
||||
return;
|
||||
}
|
||||
this.selected = false;
|
||||
for (var i = 0; i < this.relations.length; i++) {
|
||||
this.relations[i].dehighlight();
|
||||
}
|
||||
this.redraw();
|
||||
this.collapse();
|
||||
};
|
||||
|
||||
SQL.Row.prototype.setTitle = function(t) {
|
||||
var old = this.getTitle();
|
||||
for (var i=0;i<this.relations.length;i++) {
|
||||
var r = this.relations[i];
|
||||
if (r.row1 != this) { continue; }
|
||||
var tt = r.row2.getTitle().replace(new RegExp(old,"g"),t);
|
||||
if (tt != r.row2.getTitle()) { r.row2.setTitle(tt); }
|
||||
}
|
||||
SQL.Row.prototype.setTitle = function (t) {
|
||||
var old = this.getTitle();
|
||||
for (var i = 0; i < this.relations.length; i++) {
|
||||
var r = this.relations[i];
|
||||
if (r.row1 != this) {
|
||||
continue;
|
||||
}
|
||||
var tt = r.row2.getTitle().replace(new RegExp(old, "g"), t);
|
||||
if (tt != r.row2.getTitle()) {
|
||||
r.row2.setTitle(tt);
|
||||
}
|
||||
}
|
||||
|
||||
SQL.Visual.prototype.setTitle.apply(this, [t]);
|
||||
}
|
||||
SQL.Visual.prototype.setTitle.apply(this, [t]);
|
||||
};
|
||||
|
||||
SQL.Row.prototype.click = function(e) { /* clicked on row */
|
||||
SQL.publish("rowclick", this);
|
||||
this.owner.owner.rowManager.select(this);
|
||||
}
|
||||
SQL.Row.prototype.click = function (e) {
|
||||
/* clicked on row */
|
||||
SQL.publish("rowclick", this);
|
||||
this.owner.owner.rowManager.select(this);
|
||||
};
|
||||
|
||||
SQL.Row.prototype.dblclick = function(e) { /* dblclicked on row */
|
||||
OZ.Event.prevent(e);
|
||||
OZ.Event.stop(e);
|
||||
this.expand();
|
||||
}
|
||||
SQL.Row.prototype.dblclick = function (e) {
|
||||
/* dblclicked on row */
|
||||
OZ.Event.prevent(e);
|
||||
OZ.Event.stop(e);
|
||||
this.expand();
|
||||
};
|
||||
|
||||
SQL.Row.prototype.update = function(data) { /* update subset of row data */
|
||||
var des = SQL.Designer;
|
||||
if (data.nll && data.def && data.def.match(/^null$/i)) { data.def = null; }
|
||||
SQL.Row.prototype.update = function (data) {
|
||||
/* update subset of row data */
|
||||
var des = SQL.Designer;
|
||||
if (data.nll && data.def && data.def.match(/^null$/i)) {
|
||||
data.def = null;
|
||||
}
|
||||
|
||||
for (var p in data) { this.data[p] = data[p]; }
|
||||
if (!this.data.nll && this.data.def === null) { this.data.def = ""; }
|
||||
for (var p in data) {
|
||||
this.data[p] = data[p];
|
||||
}
|
||||
if (!this.data.nll && this.data.def === null) {
|
||||
this.data.def = "";
|
||||
}
|
||||
|
||||
var elm = this.getDataType();
|
||||
for (var i=0;i<this.relations.length;i++) {
|
||||
var r = this.relations[i];
|
||||
if (r.row1 == this) { r.row2.update({type:des.getFKTypeFor(this.data.type),size:this.data.size}); }
|
||||
}
|
||||
this.redraw();
|
||||
}
|
||||
var elm = this.getDataType();
|
||||
for (var i = 0; i < this.relations.length; i++) {
|
||||
var r = this.relations[i];
|
||||
if (r.row1 == this) {
|
||||
r.row2.update({
|
||||
type: des.getFKTypeFor(this.data.type),
|
||||
size: this.data.size,
|
||||
});
|
||||
}
|
||||
}
|
||||
this.redraw();
|
||||
};
|
||||
|
||||
SQL.Row.prototype.up = function() { /* shift up */
|
||||
var r = this.owner.rows;
|
||||
var idx = r.indexOf(this);
|
||||
if (!idx) { return; }
|
||||
r[idx-1].dom.container.parentNode.insertBefore(this.dom.container,r[idx-1].dom.container);
|
||||
r.splice(idx,1);
|
||||
r.splice(idx-1,0,this);
|
||||
this.redraw();
|
||||
}
|
||||
SQL.Row.prototype.up = function () {
|
||||
/* shift up */
|
||||
var r = this.owner.rows;
|
||||
var idx = r.indexOf(this);
|
||||
if (!idx) {
|
||||
return;
|
||||
}
|
||||
r[idx - 1].dom.container.parentNode.insertBefore(
|
||||
this.dom.container,
|
||||
r[idx - 1].dom.container
|
||||
);
|
||||
r.splice(idx, 1);
|
||||
r.splice(idx - 1, 0, this);
|
||||
this.redraw();
|
||||
};
|
||||
|
||||
SQL.Row.prototype.down = function() { /* shift down */
|
||||
var r = this.owner.rows;
|
||||
var idx = r.indexOf(this);
|
||||
if (idx+1 == this.owner.rows.length) { return; }
|
||||
r[idx].dom.container.parentNode.insertBefore(this.dom.container,r[idx+1].dom.container.nextSibling);
|
||||
r.splice(idx,1);
|
||||
r.splice(idx+1,0,this);
|
||||
this.redraw();
|
||||
}
|
||||
SQL.Row.prototype.down = function () {
|
||||
/* shift down */
|
||||
var r = this.owner.rows;
|
||||
var idx = r.indexOf(this);
|
||||
if (idx + 1 == this.owner.rows.length) {
|
||||
return;
|
||||
}
|
||||
r[idx].dom.container.parentNode.insertBefore(
|
||||
this.dom.container,
|
||||
r[idx + 1].dom.container.nextSibling
|
||||
);
|
||||
r.splice(idx, 1);
|
||||
r.splice(idx + 1, 0, this);
|
||||
this.redraw();
|
||||
};
|
||||
|
||||
SQL.Row.prototype.buildEdit = function() {
|
||||
OZ.DOM.clear(this.dom.container);
|
||||
SQL.Row.prototype.buildEdit = function () {
|
||||
OZ.DOM.clear(this.dom.container);
|
||||
|
||||
var elms = [];
|
||||
this.dom.name = OZ.DOM.elm("input");
|
||||
this.dom.name.type = "text";
|
||||
elms.push(["name",this.dom.name]);
|
||||
OZ.Event.add(this.dom.name, "keypress", this.enter);
|
||||
var elms = [];
|
||||
this.dom.name = OZ.DOM.elm("input");
|
||||
this.dom.name.type = "text";
|
||||
elms.push(["name", this.dom.name]);
|
||||
OZ.Event.add(this.dom.name, "keypress", this.enter);
|
||||
|
||||
this.dom.type = this.buildTypeSelect(this.data.type);
|
||||
elms.push(["type",this.dom.type]);
|
||||
this.dom.type = this.buildTypeSelect(this.data.type);
|
||||
elms.push(["type", this.dom.type]);
|
||||
|
||||
this.dom.size = OZ.DOM.elm("input");
|
||||
this.dom.size.type = "text";
|
||||
elms.push(["size",this.dom.size]);
|
||||
this.dom.size = OZ.DOM.elm("input");
|
||||
this.dom.size.type = "text";
|
||||
elms.push(["size", this.dom.size]);
|
||||
|
||||
this.dom.def = OZ.DOM.elm("input");
|
||||
this.dom.def.type = "text";
|
||||
elms.push(["def",this.dom.def]);
|
||||
this.dom.def = OZ.DOM.elm("input");
|
||||
this.dom.def.type = "text";
|
||||
elms.push(["def", this.dom.def]);
|
||||
|
||||
this.dom.ai = OZ.DOM.elm("input");
|
||||
this.dom.ai.type = "checkbox";
|
||||
elms.push(["ai",this.dom.ai]);
|
||||
this.dom.ai = OZ.DOM.elm("input");
|
||||
this.dom.ai.type = "checkbox";
|
||||
elms.push(["ai", this.dom.ai]);
|
||||
|
||||
this.dom.nll = OZ.DOM.elm("input");
|
||||
this.dom.nll.type = "checkbox";
|
||||
elms.push(["null",this.dom.nll]);
|
||||
this.dom.nll = OZ.DOM.elm("input");
|
||||
this.dom.nll.type = "checkbox";
|
||||
elms.push(["null", this.dom.nll]);
|
||||
|
||||
this.dom.comment = OZ.DOM.elm("span",{className:"comment"});
|
||||
this.dom.comment.innerHTML = "";
|
||||
this.dom.comment.appendChild(document.createTextNode(this.data.comment));
|
||||
this.dom.comment = OZ.DOM.elm("span", { className: "comment" });
|
||||
this.dom.comment.innerHTML = "";
|
||||
this.dom.comment.appendChild(document.createTextNode(this.data.comment));
|
||||
|
||||
this.dom.commentbtn = OZ.DOM.elm("input");
|
||||
this.dom.commentbtn.type = "button";
|
||||
this.dom.commentbtn.value = _("comment");
|
||||
this.dom.commentbtn = OZ.DOM.elm("input");
|
||||
this.dom.commentbtn.type = "button";
|
||||
this.dom.commentbtn.id = "commentbtn";
|
||||
this.dom.commentbtn.value = _("comment");
|
||||
|
||||
OZ.Event.add(this.dom.commentbtn, "click", this.changeComment);
|
||||
OZ.Event.add(this.dom.commentbtn, "click", this.changeComment);
|
||||
|
||||
for (var i=0;i<elms.length;i++) {
|
||||
var row = elms[i];
|
||||
var tr = OZ.DOM.elm("tr");
|
||||
var td1 = OZ.DOM.elm("td");
|
||||
var td2 = OZ.DOM.elm("td");
|
||||
var l = OZ.DOM.text(_(row[0])+": ");
|
||||
OZ.DOM.append(
|
||||
[tr, td1, td2],
|
||||
[td1, l],
|
||||
[td2, row[1]]
|
||||
);
|
||||
this.dom.container.appendChild(tr);
|
||||
}
|
||||
for (var i = 0; i < elms.length; i++) {
|
||||
var row = elms[i];
|
||||
var tr = OZ.DOM.elm("tr");
|
||||
var td1 = OZ.DOM.elm("td");
|
||||
var td2 = OZ.DOM.elm("td");
|
||||
var l = OZ.DOM.text(_(row[0]) + ": ");
|
||||
OZ.DOM.append([tr, td1, td2], [td1, l], [td2, row[1]]);
|
||||
this.dom.container.appendChild(tr);
|
||||
}
|
||||
|
||||
var tr = OZ.DOM.elm("tr");
|
||||
var td1 = OZ.DOM.elm("td");
|
||||
var td2 = OZ.DOM.elm("td");
|
||||
OZ.DOM.append(
|
||||
[tr, td1, td2],
|
||||
[td1, this.dom.comment],
|
||||
[td2, this.dom.commentbtn]
|
||||
);
|
||||
this.dom.container.appendChild(tr);
|
||||
}
|
||||
var tr = OZ.DOM.elm("tr");
|
||||
var td1 = OZ.DOM.elm("td");
|
||||
var td2 = OZ.DOM.elm("td");
|
||||
OZ.DOM.append(
|
||||
[tr, td1, td2],
|
||||
[td1, this.dom.comment],
|
||||
[td2, this.dom.commentbtn]
|
||||
);
|
||||
this.dom.container.appendChild(tr);
|
||||
};
|
||||
|
||||
SQL.Row.prototype.changeComment = function(e) {
|
||||
var c = prompt(_("commenttext"),this.data.comment);
|
||||
if (c === null) { return; }
|
||||
this.data.comment = c;
|
||||
this.dom.comment.innerHTML = "";
|
||||
this.dom.comment.appendChild(document.createTextNode(this.data.comment));
|
||||
}
|
||||
SQL.Row.prototype.changeComment = function (e) {
|
||||
var c = prompt(_("commenttext"), this.data.comment);
|
||||
if (c === null) {
|
||||
return;
|
||||
}
|
||||
this.data.comment = c;
|
||||
this.dom.comment.innerHTML = "";
|
||||
this.dom.comment.appendChild(document.createTextNode(this.data.comment));
|
||||
};
|
||||
|
||||
SQL.Row.prototype.expand = function() {
|
||||
if (this.expanded) { return; }
|
||||
this.expanded = true;
|
||||
this.buildEdit();
|
||||
this.load();
|
||||
this.redraw();
|
||||
this.dom.name.focus();
|
||||
this.dom.name.select();
|
||||
}
|
||||
SQL.Row.prototype.expand = function () {
|
||||
if (this.expanded) {
|
||||
return;
|
||||
}
|
||||
this.expanded = true;
|
||||
this.buildEdit();
|
||||
this.load();
|
||||
this.redraw();
|
||||
this.dom.container.classList.add("expanded");
|
||||
this.dom.name.focus();
|
||||
this.dom.name.select();
|
||||
};
|
||||
|
||||
SQL.Row.prototype.collapse = function() {
|
||||
if (!this.expanded) { return; }
|
||||
this.expanded = false;
|
||||
SQL.Row.prototype.collapse = function () {
|
||||
if (!this.expanded) {
|
||||
return;
|
||||
}
|
||||
this.expanded = false;
|
||||
this.dom.container.classList.remove("expanded");
|
||||
|
||||
var data = {
|
||||
type: this.dom.type.selectedIndex,
|
||||
def: this.dom.def.value,
|
||||
size: this.dom.size.value,
|
||||
nll: this.dom.nll.checked,
|
||||
ai: this.dom.ai.checked
|
||||
}
|
||||
var data = {
|
||||
type: this.dom.type.selectedIndex,
|
||||
def: this.dom.def.value,
|
||||
size: this.dom.size.value,
|
||||
nll: this.dom.nll.checked,
|
||||
ai: this.dom.ai.checked,
|
||||
};
|
||||
|
||||
OZ.DOM.clear(this.dom.container);
|
||||
this.dom.container.appendChild(this.dom.content);
|
||||
OZ.DOM.clear(this.dom.container);
|
||||
this.dom.container.appendChild(this.dom.content);
|
||||
|
||||
this.update(data);
|
||||
this.setTitle(this.dom.name.value);
|
||||
}
|
||||
this.update(data);
|
||||
this.setTitle(this.dom.name.value);
|
||||
};
|
||||
|
||||
SQL.Row.prototype.load = function() { /* put data to expanded form */
|
||||
this.dom.name.value = this.getTitle();
|
||||
var def = this.data.def;
|
||||
if (def === null) { def = "NULL"; }
|
||||
SQL.Row.prototype.load = function () {
|
||||
/* put data to expanded form */
|
||||
this.dom.name.value = this.getTitle();
|
||||
var def = this.data.def;
|
||||
if (def === null) {
|
||||
def = "NULL";
|
||||
}
|
||||
|
||||
this.dom.def.value = def;
|
||||
this.dom.size.value = this.data.size;
|
||||
this.dom.nll.checked = this.data.nll;
|
||||
this.dom.ai.checked = this.data.ai;
|
||||
}
|
||||
this.dom.def.value = def;
|
||||
this.dom.size.value = this.data.size;
|
||||
this.dom.nll.checked = this.data.nll;
|
||||
this.dom.ai.checked = this.data.ai;
|
||||
};
|
||||
|
||||
SQL.Row.prototype.redraw = function() {
|
||||
var color = this.getColor();
|
||||
this.dom.container.style.backgroundColor = color;
|
||||
OZ.DOM.removeClass(this.dom.title, "primary");
|
||||
OZ.DOM.removeClass(this.dom.title, "key");
|
||||
if (this.isPrimary()) { OZ.DOM.addClass(this.dom.title, "primary"); }
|
||||
if (this.isKey()) { OZ.DOM.addClass(this.dom.title, "key"); }
|
||||
this.dom.selected.style.display = (this.selected ? "" : "none");
|
||||
this.dom.container.title = this.data.comment;
|
||||
SQL.Row.prototype.redraw = function () {
|
||||
var color = this.getColor();
|
||||
this.dom.container.style.backgroundColor = color;
|
||||
this.dom.container.style.borderColor = color;
|
||||
OZ.DOM.removeClass(this.dom.title, "primary");
|
||||
OZ.DOM.removeClass(this.dom.title, "key");
|
||||
if (this.isPrimary()) {
|
||||
OZ.DOM.addClass(this.dom.title, "primary");
|
||||
}
|
||||
if (this.isKey()) {
|
||||
OZ.DOM.addClass(this.dom.title, "key");
|
||||
}
|
||||
this.dom.selected.style.display = this.selected ? "" : "none";
|
||||
this.dom.container.title = this.data.comment;
|
||||
|
||||
var typehint = [];
|
||||
if (this.owner.owner.getOption("showtype")) {
|
||||
var elm = this.getDataType();
|
||||
typehint.push(elm.getAttribute("sql"));
|
||||
}
|
||||
var typehint = [];
|
||||
if (this.owner.owner.getOption("showtype")) {
|
||||
var elm = this.getDataType();
|
||||
typehint.push(elm.getAttribute("sql"));
|
||||
}
|
||||
|
||||
if (this.owner.owner.getOption("showsize") && this.data.size) {
|
||||
typehint.push("(" + this.data.size + ")");
|
||||
}
|
||||
if (this.owner.owner.getOption("showsize") && this.data.size) {
|
||||
typehint.push("(" + this.data.size + ")");
|
||||
}
|
||||
|
||||
this.dom.typehint.innerHTML = typehint.join(" ");
|
||||
this.owner.redraw();
|
||||
this.owner.owner.rowManager.redraw();
|
||||
}
|
||||
this.dom.typehint.innerHTML = typehint.join(" ");
|
||||
this.owner.redraw();
|
||||
this.owner.owner.rowManager.redraw();
|
||||
};
|
||||
|
||||
SQL.Row.prototype.addRelation = function(r) {
|
||||
this.relations.push(r);
|
||||
}
|
||||
SQL.Row.prototype.addRelation = function (r) {
|
||||
this.relations.push(r);
|
||||
};
|
||||
|
||||
SQL.Row.prototype.removeRelation = function(r) {
|
||||
var idx = this.relations.indexOf(r);
|
||||
if (idx == -1) { return; }
|
||||
this.relations.splice(idx,1);
|
||||
}
|
||||
SQL.Row.prototype.removeRelation = function (r) {
|
||||
var idx = this.relations.indexOf(r);
|
||||
if (idx == -1) {
|
||||
return;
|
||||
}
|
||||
this.relations.splice(idx, 1);
|
||||
};
|
||||
|
||||
SQL.Row.prototype.addKey = function(k) {
|
||||
this.keys.push(k);
|
||||
this.redraw();
|
||||
}
|
||||
SQL.Row.prototype.addKey = function (k) {
|
||||
this.keys.push(k);
|
||||
this.redraw();
|
||||
};
|
||||
|
||||
SQL.Row.prototype.removeKey = function(k) {
|
||||
var idx = this.keys.indexOf(k);
|
||||
if (idx == -1) { return; }
|
||||
this.keys.splice(idx,1);
|
||||
this.redraw();
|
||||
}
|
||||
SQL.Row.prototype.removeKey = function (k) {
|
||||
var idx = this.keys.indexOf(k);
|
||||
if (idx == -1) {
|
||||
return;
|
||||
}
|
||||
this.keys.splice(idx, 1);
|
||||
this.redraw();
|
||||
};
|
||||
|
||||
SQL.Row.prototype.getDataType = function() {
|
||||
var type = this.data.type;
|
||||
var elm = DATATYPES.getElementsByTagName("type")[type];
|
||||
return elm;
|
||||
}
|
||||
SQL.Row.prototype.getDataType = function () {
|
||||
var type = this.data.type;
|
||||
var elm = DATATYPES.getElementsByTagName("type")[type];
|
||||
return elm;
|
||||
};
|
||||
|
||||
SQL.Row.prototype.getColor = function() {
|
||||
var elm = this.getDataType();
|
||||
var g = this.getDataType().parentNode;
|
||||
return elm.getAttribute("color") || g.getAttribute("color") || "#fff";
|
||||
}
|
||||
SQL.Row.prototype.getColor = function () {
|
||||
var elm = this.getDataType();
|
||||
var g = this.getDataType().parentNode;
|
||||
return elm.getAttribute("color") || g.getAttribute("color") || "#fff";
|
||||
};
|
||||
|
||||
SQL.Row.prototype.buildTypeSelect = function(id) { /* build selectbox with avail datatypes */
|
||||
var s = OZ.DOM.elm("select");
|
||||
var gs = DATATYPES.getElementsByTagName("group");
|
||||
for (var i=0;i<gs.length;i++) {
|
||||
var g = gs[i];
|
||||
var og = OZ.DOM.elm("optgroup");
|
||||
og.style.backgroundColor = g.getAttribute("color") || "#fff";
|
||||
og.label = g.getAttribute("label");
|
||||
s.appendChild(og);
|
||||
var ts = g.getElementsByTagName("type");
|
||||
for (var j=0;j<ts.length;j++) {
|
||||
var t = ts[j];
|
||||
var o = OZ.DOM.elm("option");
|
||||
if (t.getAttribute("color")) { o.style.backgroundColor = t.getAttribute("color"); }
|
||||
if (t.getAttribute("note")) { o.title = t.getAttribute("note"); }
|
||||
o.innerHTML = t.getAttribute("label");
|
||||
og.appendChild(o);
|
||||
}
|
||||
}
|
||||
s.selectedIndex = id;
|
||||
return s;
|
||||
}
|
||||
SQL.Row.prototype.buildTypeSelect = function (id) {
|
||||
/* build selectbox with avail datatypes */
|
||||
var s = OZ.DOM.elm("select");
|
||||
var gs = DATATYPES.getElementsByTagName("group");
|
||||
for (var i = 0; i < gs.length; i++) {
|
||||
var g = gs[i];
|
||||
var og = OZ.DOM.elm("optgroup");
|
||||
og.style.backgroundColor = g.getAttribute("color") || "#fff";
|
||||
og.label = g.getAttribute("label");
|
||||
s.appendChild(og);
|
||||
var ts = g.getElementsByTagName("type");
|
||||
for (var j = 0; j < ts.length; j++) {
|
||||
var t = ts[j];
|
||||
var o = OZ.DOM.elm("option");
|
||||
if (t.getAttribute("color")) {
|
||||
o.style.backgroundColor = t.getAttribute("color");
|
||||
}
|
||||
if (t.getAttribute("note")) {
|
||||
o.title = t.getAttribute("note");
|
||||
}
|
||||
o.innerHTML = t.getAttribute("label");
|
||||
og.appendChild(o);
|
||||
}
|
||||
}
|
||||
s.selectedIndex = id;
|
||||
return s;
|
||||
};
|
||||
|
||||
SQL.Row.prototype.destroy = function() {
|
||||
SQL.Visual.prototype.destroy.apply(this);
|
||||
while (this.relations.length) {
|
||||
this.owner.owner.removeRelation(this.relations[0]);
|
||||
}
|
||||
for (var i=0;i<this.keys.length;i++){
|
||||
this.keys[i].removeRow(this);
|
||||
}
|
||||
}
|
||||
SQL.Row.prototype.destroy = function () {
|
||||
SQL.Visual.prototype.destroy.apply(this);
|
||||
while (this.relations.length) {
|
||||
this.owner.owner.removeRelation(this.relations[0]);
|
||||
}
|
||||
for (var i = 0; i < this.keys.length; i++) {
|
||||
this.keys[i].removeRow(this);
|
||||
}
|
||||
};
|
||||
|
||||
SQL.Row.prototype.toXML = function() {
|
||||
var xml = "";
|
||||
SQL.Row.prototype.toXML = function () {
|
||||
var xml = "";
|
||||
|
||||
var t = this.getTitle().replace(/"/g,""");
|
||||
var nn = (this.data.nll ? "1" : "0");
|
||||
var ai = (this.data.ai ? "1" : "0");
|
||||
xml += '<row name="'+t+'" null="'+nn+'" autoincrement="'+ai+'">\n';
|
||||
var t = this.getTitle().replace(/"/g, """);
|
||||
var nn = this.data.nll ? "1" : "0";
|
||||
var ai = this.data.ai ? "1" : "0";
|
||||
xml +=
|
||||
'<row name="' + t + '" null="' + nn + '" autoincrement="' + ai + '">\n';
|
||||
|
||||
var elm = this.getDataType();
|
||||
var t = elm.getAttribute("sql");
|
||||
if (this.data.size.length) { t += "("+this.data.size+")"; }
|
||||
xml += "<datatype>"+t+"</datatype>\n";
|
||||
var elm = this.getDataType();
|
||||
var t = elm.getAttribute("sql");
|
||||
if (this.data.size.length) {
|
||||
t += "(" + this.data.size + ")";
|
||||
}
|
||||
xml += "<datatype>" + t + "</datatype>\n";
|
||||
|
||||
if (this.data.def || this.data.def === null) {
|
||||
var q = elm.getAttribute("quote");
|
||||
var d = this.data.def;
|
||||
if (d === null) {
|
||||
d = "NULL";
|
||||
} else if (d != "CURRENT_TIMESTAMP") {
|
||||
d = q+d+q;
|
||||
}
|
||||
xml += "<default>"+SQL.escape(d)+"</default>";
|
||||
}
|
||||
if (this.data.def || this.data.def === null) {
|
||||
var q = elm.getAttribute("quote");
|
||||
var d = this.data.def;
|
||||
if (d === null) {
|
||||
d = "NULL";
|
||||
} else if (d != "CURRENT_TIMESTAMP") {
|
||||
d = q + d + q;
|
||||
}
|
||||
xml += "<default>" + SQL.escape(d) + "</default>";
|
||||
}
|
||||
|
||||
for (var i=0;i<this.relations.length;i++) {
|
||||
var r = this.relations[i];
|
||||
if (r.row2 != this) { continue; }
|
||||
xml += '<relation table="'+r.row1.owner.getTitle()+'" row="'+r.row1.getTitle()+'" />\n';
|
||||
}
|
||||
for (var i = 0; i < this.relations.length; i++) {
|
||||
var r = this.relations[i];
|
||||
if (r.row2 != this) {
|
||||
continue;
|
||||
}
|
||||
xml +=
|
||||
'<relation table="' +
|
||||
r.row1.owner.getTitle() +
|
||||
'" row="' +
|
||||
r.row1.getTitle() +
|
||||
'" />\n';
|
||||
}
|
||||
|
||||
if (this.data.comment) {
|
||||
xml += "<comment>"+SQL.escape(this.data.comment)+"</comment>\n";
|
||||
}
|
||||
if (this.data.comment) {
|
||||
xml += "<comment>" + SQL.escape(this.data.comment) + "</comment>\n";
|
||||
}
|
||||
|
||||
xml += "</row>\n";
|
||||
return xml;
|
||||
}
|
||||
xml += "</row>\n";
|
||||
return xml;
|
||||
};
|
||||
|
||||
SQL.Row.prototype.fromXML = function(node) {
|
||||
var name = node.getAttribute("name");
|
||||
SQL.Row.prototype.fromXML = function (node) {
|
||||
var name = node.getAttribute("name");
|
||||
|
||||
var obj = { type:0, size:"" };
|
||||
obj.nll = (node.getAttribute("null") == "1");
|
||||
obj.ai = (node.getAttribute("autoincrement") == "1");
|
||||
var obj = { type: 0, size: "" };
|
||||
obj.nll = node.getAttribute("null") == "1";
|
||||
obj.ai = node.getAttribute("autoincrement") == "1";
|
||||
|
||||
var cs = node.getElementsByTagName("comment");
|
||||
if (cs.length && cs[0].firstChild) { obj.comment = cs[0].firstChild.nodeValue; }
|
||||
var cs = node.getElementsByTagName("comment");
|
||||
if (cs.length && cs[0].firstChild) {
|
||||
obj.comment = cs[0].firstChild.nodeValue;
|
||||
}
|
||||
|
||||
var d = node.getElementsByTagName("datatype");
|
||||
if (d.length && d[0].firstChild) {
|
||||
var s = d[0].firstChild.nodeValue;
|
||||
var r = s.match(/^([^\(]+)(\((.*)\))?.*$/);
|
||||
var type = r[1];
|
||||
if (r[3]) { obj.size = r[3]; }
|
||||
var types = window.DATATYPES.getElementsByTagName("type");
|
||||
for (var i=0;i<types.length;i++) {
|
||||
var sql = types[i].getAttribute("sql");
|
||||
var re = types[i].getAttribute("re");
|
||||
if (sql == type || (re && new RegExp(re).exec(type)) ) { obj.type = i; }
|
||||
}
|
||||
}
|
||||
var d = node.getElementsByTagName("datatype");
|
||||
if (d.length && d[0].firstChild) {
|
||||
var s = d[0].firstChild.nodeValue;
|
||||
var r = s.match(/^([^\(]+)(\((.*)\))?.*$/);
|
||||
var type = r[1];
|
||||
if (r[3]) {
|
||||
obj.size = r[3];
|
||||
}
|
||||
var types = window.DATATYPES.getElementsByTagName("type");
|
||||
for (var i = 0; i < types.length; i++) {
|
||||
var sql = types[i].getAttribute("sql");
|
||||
var re = types[i].getAttribute("re");
|
||||
if (sql == type || (re && new RegExp(re).exec(type))) {
|
||||
obj.type = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var elm = DATATYPES.getElementsByTagName("type")[obj.type];
|
||||
var d = node.getElementsByTagName("default");
|
||||
if (d.length && d[0].firstChild) {
|
||||
var def = d[0].firstChild.nodeValue;
|
||||
obj.def = def;
|
||||
var q = elm.getAttribute("quote");
|
||||
if (q) {
|
||||
var re = new RegExp("^"+q+"(.*)"+q+"$");
|
||||
var r = def.match(re);
|
||||
if (r) { obj.def = r[1]; }
|
||||
}
|
||||
}
|
||||
var elm = DATATYPES.getElementsByTagName("type")[obj.type];
|
||||
var d = node.getElementsByTagName("default");
|
||||
if (d.length && d[0].firstChild) {
|
||||
var def = d[0].firstChild.nodeValue;
|
||||
obj.def = def;
|
||||
var q = elm.getAttribute("quote");
|
||||
if (q) {
|
||||
var re = new RegExp("^" + q + "(.*)" + q + "$");
|
||||
var r = def.match(re);
|
||||
if (r) {
|
||||
obj.def = r[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.update(obj);
|
||||
this.setTitle(name);
|
||||
}
|
||||
this.update(obj);
|
||||
this.setTitle(name);
|
||||
};
|
||||
|
||||
SQL.Row.prototype.isPrimary = function() {
|
||||
for (var i=0;i<this.keys.length;i++) {
|
||||
var k = this.keys[i];
|
||||
if (k.getType() == "PRIMARY") { return true; }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
SQL.Row.prototype.isPrimary = function () {
|
||||
for (var i = 0; i < this.keys.length; i++) {
|
||||
var k = this.keys[i];
|
||||
if (k.getType() == "PRIMARY") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
SQL.Row.prototype.isUnique = function() {
|
||||
for (var i=0;i<this.keys.length;i++) {
|
||||
var k = this.keys[i];
|
||||
var t = k.getType();
|
||||
if (t == "PRIMARY" || t == "UNIQUE") { return true; }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
SQL.Row.prototype.isUnique = function () {
|
||||
for (var i = 0; i < this.keys.length; i++) {
|
||||
var k = this.keys[i];
|
||||
var t = k.getType();
|
||||
if (t == "PRIMARY" || t == "UNIQUE") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
SQL.Row.prototype.isKey = function() {
|
||||
return this.keys.length > 0;
|
||||
}
|
||||
SQL.Row.prototype.isKey = function () {
|
||||
return this.keys.length > 0;
|
||||
};
|
||||
|
||||
SQL.Row.prototype.enter = function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
this.collapse();
|
||||
}
|
||||
}
|
||||
SQL.Row.prototype.enter = function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
this.collapse();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,188 +1,239 @@
|
||||
/* --------------------- row manager ------------ */
|
||||
SQL.RowManager = function(owner) {
|
||||
this.owner = owner;
|
||||
this.dom = {};
|
||||
this.selected = null;
|
||||
this.creating = false;
|
||||
this.connecting = false;
|
||||
SQL.RowManager = function (owner) {
|
||||
this.owner = owner;
|
||||
this.dom = {};
|
||||
this.selected = null;
|
||||
this.creating = false;
|
||||
this.connecting = false;
|
||||
|
||||
var ids = ["editrow","removerow","uprow","downrow","foreigncreate","foreignconnect","foreigndisconnect"];
|
||||
for (var i=0;i<ids.length;i++) {
|
||||
var id = ids[i];
|
||||
var elm = OZ.$(id);
|
||||
this.dom[id] = elm;
|
||||
elm.value = _(id);
|
||||
}
|
||||
var ids = [
|
||||
"editrow",
|
||||
"removerow",
|
||||
"uprow",
|
||||
"downrow",
|
||||
"foreigncreate",
|
||||
"foreignconnect",
|
||||
"foreigndisconnect",
|
||||
];
|
||||
for (var i = 0; i < ids.length; i++) {
|
||||
var id = ids[i];
|
||||
var elm = OZ.$(id);
|
||||
this.dom[id] = elm;
|
||||
elm.value = _(id);
|
||||
}
|
||||
|
||||
this.select(false);
|
||||
this.select(false);
|
||||
|
||||
OZ.Event.add(this.dom.editrow, "click", this.edit.bind(this));
|
||||
OZ.Event.add(this.dom.uprow, "click", this.up.bind(this));
|
||||
OZ.Event.add(this.dom.downrow, "click", this.down.bind(this));
|
||||
OZ.Event.add(this.dom.removerow, "click", this.remove.bind(this));
|
||||
OZ.Event.add(this.dom.foreigncreate, "click", this.foreigncreate.bind(this));
|
||||
OZ.Event.add(this.dom.foreignconnect, "click", this.foreignconnect.bind(this));
|
||||
OZ.Event.add(this.dom.foreigndisconnect, "click", this.foreigndisconnect.bind(this));
|
||||
OZ.Event.add(window, "keydown", this.press.bind(this));
|
||||
OZ.Event.add(this.dom.editrow, "click", this.edit.bind(this));
|
||||
OZ.Event.add(this.dom.uprow, "click", this.up.bind(this));
|
||||
OZ.Event.add(this.dom.downrow, "click", this.down.bind(this));
|
||||
OZ.Event.add(this.dom.removerow, "click", this.remove.bind(this));
|
||||
OZ.Event.add(
|
||||
this.dom.foreigncreate,
|
||||
"click",
|
||||
this.foreigncreate.bind(this)
|
||||
);
|
||||
OZ.Event.add(
|
||||
this.dom.foreignconnect,
|
||||
"click",
|
||||
this.foreignconnect.bind(this)
|
||||
);
|
||||
OZ.Event.add(
|
||||
this.dom.foreigndisconnect,
|
||||
"click",
|
||||
this.foreigndisconnect.bind(this)
|
||||
);
|
||||
OZ.Event.add(document, "keydown", this.press.bind(this));
|
||||
|
||||
SQL.subscribe("tableclick", this.tableClick.bind(this));
|
||||
SQL.subscribe("rowclick", this.rowClick.bind(this));
|
||||
}
|
||||
SQL.subscribe("tableclick", this.tableClick.bind(this));
|
||||
SQL.subscribe("rowclick", this.rowClick.bind(this));
|
||||
};
|
||||
|
||||
SQL.RowManager.prototype.select = function(row) { /* activate a row */
|
||||
if (this.selected === row) { return; }
|
||||
if (this.selected) { this.selected.deselect(); }
|
||||
SQL.RowManager.prototype.select = function (row) {
|
||||
/* activate a row */
|
||||
if (this.selected === row) {
|
||||
return;
|
||||
}
|
||||
if (this.selected) {
|
||||
this.selected.deselect();
|
||||
}
|
||||
|
||||
this.selected = row;
|
||||
if (this.selected) { this.selected.select(); }
|
||||
this.redraw();
|
||||
}
|
||||
this.selected = row;
|
||||
if (this.selected) {
|
||||
this.selected.select();
|
||||
}
|
||||
this.redraw();
|
||||
};
|
||||
|
||||
SQL.RowManager.prototype.tableClick = function(e) { /* create relation after clicking target table */
|
||||
if (!this.creating) { return; }
|
||||
SQL.RowManager.prototype.tableClick = function (e) {
|
||||
/* create relation after clicking target table */
|
||||
if (!this.creating) {
|
||||
return;
|
||||
}
|
||||
|
||||
var r1 = this.selected;
|
||||
var t2 = e.target;
|
||||
var r1 = this.selected;
|
||||
var t2 = e.target;
|
||||
|
||||
var p = this.owner.getOption("pattern");
|
||||
p = p.replace(/%T/g,r1.owner.getTitle());
|
||||
p = p.replace(/%t/g,t2.getTitle());
|
||||
p = p.replace(/%R/g,r1.getTitle());
|
||||
var p = this.owner.getOption("pattern");
|
||||
p = p.replace(/%T/g, r1.owner.getTitle());
|
||||
p = p.replace(/%t/g, t2.getTitle());
|
||||
p = p.replace(/%R/g, r1.getTitle());
|
||||
|
||||
var r2 = t2.addRow(p, r1.data);
|
||||
r2.update({"type":SQL.Designer.getFKTypeFor(r1.data.type)});
|
||||
r2.update({"ai":false});
|
||||
this.owner.addRelation(r1, r2);
|
||||
}
|
||||
var r2 = t2.addRow(p, r1.data);
|
||||
r2.update({ type: SQL.Designer.getFKTypeFor(r1.data.type) });
|
||||
r2.update({ ai: false });
|
||||
this.owner.addRelation(r1, r2);
|
||||
};
|
||||
|
||||
SQL.RowManager.prototype.rowClick = function(e) { /* draw relation after clicking target row */
|
||||
if (!this.connecting) { return; }
|
||||
SQL.RowManager.prototype.rowClick = function (e) {
|
||||
/* draw relation after clicking target row */
|
||||
if (!this.connecting) {
|
||||
return;
|
||||
}
|
||||
|
||||
var r1 = this.selected;
|
||||
var r2 = e.target;
|
||||
var r1 = this.selected;
|
||||
var r2 = e.target;
|
||||
|
||||
if (r1 == r2) { return; }
|
||||
if (r1 == r2) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.owner.addRelation(r1, r2);
|
||||
}
|
||||
this.owner.addRelation(r1, r2);
|
||||
};
|
||||
|
||||
SQL.RowManager.prototype.foreigncreate = function(e) { /* start creating fk */
|
||||
this.endConnect();
|
||||
if (this.creating) {
|
||||
this.endCreate();
|
||||
} else {
|
||||
this.creating = true;
|
||||
this.dom.foreigncreate.value = "["+_("foreignpending")+"]";
|
||||
}
|
||||
}
|
||||
SQL.RowManager.prototype.foreigncreate = function (e) {
|
||||
/* start creating fk */
|
||||
this.endConnect();
|
||||
if (this.creating) {
|
||||
this.endCreate();
|
||||
} else {
|
||||
this.creating = true;
|
||||
this.dom.foreigncreate.value = "[" + _("foreignpending") + "]";
|
||||
}
|
||||
};
|
||||
|
||||
SQL.RowManager.prototype.foreignconnect = function(e) { /* start drawing fk */
|
||||
this.endCreate();
|
||||
if (this.connecting) {
|
||||
this.endConnect();
|
||||
} else {
|
||||
this.connecting = true;
|
||||
this.dom.foreignconnect.value = "["+_("foreignconnectpending")+"]";
|
||||
}
|
||||
}
|
||||
SQL.RowManager.prototype.foreignconnect = function (e) {
|
||||
/* start drawing fk */
|
||||
this.endCreate();
|
||||
if (this.connecting) {
|
||||
this.endConnect();
|
||||
} else {
|
||||
this.connecting = true;
|
||||
this.dom.foreignconnect.value = "[" + _("foreignconnectpending") + "]";
|
||||
}
|
||||
};
|
||||
|
||||
SQL.RowManager.prototype.foreigndisconnect = function(e) { /* remove connector */
|
||||
var rels = this.selected.relations;
|
||||
for (var i=rels.length-1;i>=0;i--) {
|
||||
var r = rels[i];
|
||||
if (r.row2 == this.selected) { this.owner.removeRelation(r); }
|
||||
}
|
||||
this.redraw();
|
||||
}
|
||||
SQL.RowManager.prototype.foreigndisconnect = function (e) {
|
||||
/* remove connector */
|
||||
var rels = this.selected.relations;
|
||||
for (var i = rels.length - 1; i >= 0; i--) {
|
||||
var r = rels[i];
|
||||
if (r.row2 == this.selected) {
|
||||
this.owner.removeRelation(r);
|
||||
}
|
||||
}
|
||||
this.redraw();
|
||||
};
|
||||
|
||||
SQL.RowManager.prototype.endCreate = function() {
|
||||
this.creating = false;
|
||||
this.dom.foreigncreate.value = _("foreigncreate");
|
||||
}
|
||||
SQL.RowManager.prototype.endCreate = function () {
|
||||
this.creating = false;
|
||||
this.dom.foreigncreate.value = _("foreigncreate");
|
||||
};
|
||||
|
||||
SQL.RowManager.prototype.endConnect = function() {
|
||||
this.connecting = false;
|
||||
this.dom.foreignconnect.value = _("foreignconnect");
|
||||
}
|
||||
SQL.RowManager.prototype.endConnect = function () {
|
||||
this.connecting = false;
|
||||
this.dom.foreignconnect.value = _("foreignconnect");
|
||||
};
|
||||
|
||||
SQL.RowManager.prototype.up = function(e) {
|
||||
this.selected.up();
|
||||
this.redraw();
|
||||
}
|
||||
SQL.RowManager.prototype.up = function (e) {
|
||||
this.selected.up();
|
||||
this.redraw();
|
||||
};
|
||||
|
||||
SQL.RowManager.prototype.down = function(e) {
|
||||
this.selected.down();
|
||||
this.redraw();
|
||||
}
|
||||
SQL.RowManager.prototype.down = function (e) {
|
||||
this.selected.down();
|
||||
this.redraw();
|
||||
};
|
||||
|
||||
SQL.RowManager.prototype.remove = function(e) {
|
||||
var result = confirm(_("confirmrow")+" '"+this.selected.getTitle()+"' ?");
|
||||
if (!result) { return; }
|
||||
var t = this.selected.owner;
|
||||
this.selected.owner.removeRow(this.selected);
|
||||
SQL.RowManager.prototype.remove = function (e) {
|
||||
var result = confirm(
|
||||
_("confirmrow") + " '" + this.selected.getTitle() + "' ?"
|
||||
);
|
||||
if (!result) {
|
||||
return;
|
||||
}
|
||||
var t = this.selected.owner;
|
||||
this.selected.owner.removeRow(this.selected);
|
||||
|
||||
var next = false;
|
||||
if (t.rows) { next = t.rows[t.rows.length-1]; }
|
||||
this.select(next);
|
||||
}
|
||||
var next = false;
|
||||
if (t.rows) {
|
||||
next = t.rows[t.rows.length - 1];
|
||||
}
|
||||
this.select(next);
|
||||
};
|
||||
|
||||
SQL.RowManager.prototype.redraw = function() {
|
||||
this.endCreate();
|
||||
this.endConnect();
|
||||
if (this.selected) {
|
||||
var table = this.selected.owner;
|
||||
var rows = table.rows;
|
||||
this.dom.uprow.disabled = (rows[0] == this.selected);
|
||||
this.dom.downrow.disabled = (rows[rows.length-1] == this.selected);
|
||||
this.dom.removerow.disabled = false;
|
||||
this.dom.editrow.disabled = false;
|
||||
this.dom.foreigncreate.disabled = !(this.selected.isUnique());
|
||||
this.dom.foreignconnect.disabled = !(this.selected.isUnique());
|
||||
SQL.RowManager.prototype.redraw = function () {
|
||||
this.endCreate();
|
||||
this.endConnect();
|
||||
if (this.selected) {
|
||||
var table = this.selected.owner;
|
||||
var rows = table.rows;
|
||||
this.dom.uprow.disabled = rows[0] == this.selected;
|
||||
this.dom.downrow.disabled = rows[rows.length - 1] == this.selected;
|
||||
this.dom.removerow.disabled = false;
|
||||
this.dom.editrow.disabled = false;
|
||||
this.dom.foreigncreate.disabled = !this.selected.isUnique();
|
||||
this.dom.foreignconnect.disabled = !this.selected.isUnique();
|
||||
|
||||
this.dom.foreigndisconnect.disabled = true;
|
||||
var rels = this.selected.relations;
|
||||
for (var i=0;i<rels.length;i++) {
|
||||
var r = rels[i];
|
||||
if (r.row2 == this.selected) { this.dom.foreigndisconnect.disabled = false; }
|
||||
}
|
||||
this.dom.foreigndisconnect.disabled = true;
|
||||
var rels = this.selected.relations;
|
||||
for (var i = 0; i < rels.length; i++) {
|
||||
var r = rels[i];
|
||||
if (r.row2 == this.selected) {
|
||||
this.dom.foreigndisconnect.disabled = false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.dom.uprow.disabled = true;
|
||||
this.dom.downrow.disabled = true;
|
||||
this.dom.removerow.disabled = true;
|
||||
this.dom.editrow.disabled = true;
|
||||
this.dom.foreigncreate.disabled = true;
|
||||
this.dom.foreignconnect.disabled = true;
|
||||
this.dom.foreigndisconnect.disabled = true;
|
||||
}
|
||||
};
|
||||
|
||||
} else {
|
||||
this.dom.uprow.disabled = true;
|
||||
this.dom.downrow.disabled = true;
|
||||
this.dom.removerow.disabled = true;
|
||||
this.dom.editrow.disabled = true;
|
||||
this.dom.foreigncreate.disabled = true;
|
||||
this.dom.foreignconnect.disabled = true;
|
||||
this.dom.foreigndisconnect.disabled = true;
|
||||
}
|
||||
}
|
||||
SQL.RowManager.prototype.press = function (e) {
|
||||
if (!this.selected) {
|
||||
return;
|
||||
}
|
||||
|
||||
SQL.RowManager.prototype.press = function(e) {
|
||||
if (!this.selected) { return; }
|
||||
var target = OZ.Event.target(e).nodeName.toLowerCase();
|
||||
if (target == "textarea" || target == "input") {
|
||||
return;
|
||||
} /* not when in form field */
|
||||
|
||||
var target = OZ.Event.target(e).nodeName.toLowerCase();
|
||||
if (target == "textarea" || target == "input") { return; } /* not when in form field */
|
||||
switch (e.keyCode) {
|
||||
case 38:
|
||||
this.up();
|
||||
OZ.Event.prevent(e);
|
||||
break;
|
||||
case 40:
|
||||
this.down();
|
||||
OZ.Event.prevent(e);
|
||||
break;
|
||||
case 46:
|
||||
this.remove();
|
||||
OZ.Event.prevent(e);
|
||||
break;
|
||||
case 13:
|
||||
case 27:
|
||||
this.selected.collapse();
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
switch (e.keyCode) {
|
||||
case 38:
|
||||
this.up();
|
||||
OZ.Event.prevent(e);
|
||||
break;
|
||||
case 40:
|
||||
this.down();
|
||||
OZ.Event.prevent(e);
|
||||
break;
|
||||
case 46:
|
||||
this.remove();
|
||||
OZ.Event.prevent(e);
|
||||
break;
|
||||
case 13:
|
||||
case 27:
|
||||
this.selected.collapse();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
SQL.RowManager.prototype.edit = function(e) {
|
||||
this.selected.expand();
|
||||
}
|
||||
SQL.RowManager.prototype.edit = function (e) {
|
||||
this.selected.expand();
|
||||
};
|
||||
|
||||
@@ -1,48 +1,60 @@
|
||||
/* --------------------- rubberband -------------------- */
|
||||
|
||||
SQL.Rubberband = function(owner) {
|
||||
this.owner = owner;
|
||||
SQL.Visual.apply(this);
|
||||
this.dom.container = OZ.$("rubberband");
|
||||
OZ.Event.add("area", "mousedown", this.down.bind(this));
|
||||
}
|
||||
SQL.Rubberband = function (owner) {
|
||||
this.owner = owner;
|
||||
SQL.Visual.apply(this);
|
||||
this.dom.container = OZ.$("rubberband");
|
||||
OZ.Event.add("area", "mousedown", this.down.bind(this));
|
||||
};
|
||||
SQL.Rubberband.prototype = Object.create(SQL.Visual.prototype);
|
||||
|
||||
SQL.Rubberband.prototype.down = function(e) {
|
||||
OZ.Event.prevent(e);
|
||||
var scroll = OZ.DOM.scroll();
|
||||
this.x = this.x0 = e.clientX + scroll[0];
|
||||
this.y = this.y0 = e.clientY + scroll[1];
|
||||
this.width = 0;
|
||||
this.height = 0;
|
||||
this.redraw();
|
||||
this.documentMove = OZ.Event.add(document, "mousemove", this.move.bind(this));
|
||||
this.documentUp = OZ.Event.add(document, "mouseup", this.up.bind(this));
|
||||
}
|
||||
SQL.Rubberband.prototype.down = function (e) {
|
||||
OZ.Event.prevent(e);
|
||||
var scroll = OZ.DOM.scroll();
|
||||
this.x = this.x0 = e.clientX + scroll[0];
|
||||
this.y = this.y0 = e.clientY + scroll[1];
|
||||
this.width = 0;
|
||||
this.height = 0;
|
||||
this.redraw();
|
||||
this.documentMove = OZ.Event.add(
|
||||
document,
|
||||
"mousemove",
|
||||
this.move.bind(this)
|
||||
);
|
||||
this.documentUp = OZ.Event.add(document, "mouseup", this.up.bind(this));
|
||||
};
|
||||
|
||||
SQL.Rubberband.prototype.move = function(e) {
|
||||
var scroll = OZ.DOM.scroll();
|
||||
var x = e.clientX + scroll[0];
|
||||
var y = e.clientY + scroll[1];
|
||||
this.width = Math.abs(x-this.x0);
|
||||
this.height = Math.abs(y-this.y0);
|
||||
if (x<this.x0) { this.x = x; } else { this.x = this.x0; }
|
||||
if (y<this.y0) { this.y = y; } else { this.y = this.y0; }
|
||||
this.redraw();
|
||||
this.dom.container.style.visibility = "visible";
|
||||
}
|
||||
SQL.Rubberband.prototype.move = function (e) {
|
||||
var scroll = OZ.DOM.scroll();
|
||||
var x = e.clientX + scroll[0];
|
||||
var y = e.clientY + scroll[1];
|
||||
this.width = Math.abs(x - this.x0);
|
||||
this.height = Math.abs(y - this.y0);
|
||||
if (x < this.x0) {
|
||||
this.x = x;
|
||||
} else {
|
||||
this.x = this.x0;
|
||||
}
|
||||
if (y < this.y0) {
|
||||
this.y = y;
|
||||
} else {
|
||||
this.y = this.y0;
|
||||
}
|
||||
this.redraw();
|
||||
this.dom.container.style.visibility = "visible";
|
||||
};
|
||||
|
||||
SQL.Rubberband.prototype.up = function(e) {
|
||||
OZ.Event.prevent(e);
|
||||
this.dom.container.style.visibility = "hidden";
|
||||
OZ.Event.remove(this.documentMove);
|
||||
OZ.Event.remove(this.documentUp);
|
||||
this.owner.tableManager.selectRect(this.x, this.y, this.width, this.height);
|
||||
}
|
||||
SQL.Rubberband.prototype.up = function (e) {
|
||||
OZ.Event.prevent(e);
|
||||
this.dom.container.style.visibility = "hidden";
|
||||
OZ.Event.remove(this.documentMove);
|
||||
OZ.Event.remove(this.documentUp);
|
||||
this.owner.tableManager.selectRect(this.x, this.y, this.width, this.height);
|
||||
};
|
||||
|
||||
SQL.Rubberband.prototype.redraw = function() {
|
||||
this.dom.container.style.left = this.x+"px";
|
||||
this.dom.container.style.top = this.y+"px";
|
||||
this.dom.container.style.width = this.width+"px";
|
||||
this.dom.container.style.height = this.height+"px";
|
||||
}
|
||||
SQL.Rubberband.prototype.redraw = function () {
|
||||
this.dom.container.style.left = this.x + "px";
|
||||
this.dom.container.style.top = this.y + "px";
|
||||
this.dom.container.style.width = this.width + "px";
|
||||
this.dom.container.style.height = this.height + "px";
|
||||
};
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
SQL.Storage.Browser = function(owner) {
|
||||
SQL.Storage.call(this, owner);
|
||||
this._dom.option.innerHTML = _("storage.browser");
|
||||
this._prefix = "wwwsqldesigner_databases_";
|
||||
|
||||
this._buildButton("clientlocalsave", "_clickSave");
|
||||
this._buildButton("clientlocalload", "_clickLoad");
|
||||
this._dom.list = document.createElement("select");
|
||||
}
|
||||
SQL.Storage.Browser.prototype = Object.create(SQL.Storage.prototype);
|
||||
|
||||
SQL.Storage.Browser.prototype.activate = function(parent) {
|
||||
parent.appendChild(this._dom.list);
|
||||
|
||||
SQL.Storage.prototype.activate.call(this, parent);
|
||||
|
||||
this._list();
|
||||
}
|
||||
|
||||
SQL.Storage.Browser.prototype._save = function(keyword) {
|
||||
var xml = this.owner.owner.toXML();
|
||||
if (xml.length >= (5*1024*1024)/2) { /* this is a very big db structure... */
|
||||
alert("Warning: your database structure is above 5 megabytes in size, this is above the localStorage single key limit allowed by some browsers, example Mozilla Firefox 10");
|
||||
return;
|
||||
}
|
||||
|
||||
var key = this._prefix + keyword;
|
||||
|
||||
try {
|
||||
localStorage.setItem(key, xml);
|
||||
if (localStorage.getItem(key) != xml) { throw new Error("Content verification failed"); }
|
||||
this._keyword = keyword;
|
||||
this._list();
|
||||
} catch (e) {
|
||||
alert("Error saving database structure to localStorage! ("+e.message+")");
|
||||
}
|
||||
}
|
||||
|
||||
SQL.Storage.Browser.prototype._load = function(keyword) {
|
||||
try {
|
||||
var xml = localStorage.getItem(this._prefix + keyword);
|
||||
if (!xml) { throw new Error("No data available"); }
|
||||
} catch (e) {
|
||||
alert("Error loading database structure from localStorage! ("+e.message+")");
|
||||
return;
|
||||
}
|
||||
|
||||
this.owner.fromXMLText(xml);
|
||||
this._keyword = keyword;
|
||||
}
|
||||
|
||||
SQL.Storage.Browser.prototype._clickSave = function(e) {
|
||||
var keyword = this._dom.list.value;
|
||||
if (!keyword) {
|
||||
keyword = prompt(_("serversaveprompt"));
|
||||
if (!keyword) { return; }
|
||||
}
|
||||
|
||||
this._save(keyword);
|
||||
}
|
||||
|
||||
SQL.Storage.Browser.prototype._clickLoad = function(e) {
|
||||
var keyword = this._dom.list.value;
|
||||
if (!keyword) {
|
||||
alert("Error loading saved data");
|
||||
return;
|
||||
}
|
||||
|
||||
this._load(keyword);
|
||||
}
|
||||
|
||||
SQL.Storage.Browser.prototype._list = function() {
|
||||
var re = new RegExp("^" + this._prefix);
|
||||
var localLen = localStorage.length;
|
||||
var results = [];
|
||||
|
||||
for (var i = 0; i<localStorage.length; i++) {
|
||||
var key = localStorage.key(i);
|
||||
if (!key.match(re)) { continue; }
|
||||
results.push(key.substring(this._prefix.length));
|
||||
}
|
||||
|
||||
this._dom.list.innerHTML = "";
|
||||
|
||||
var empty = document.createElement("option");
|
||||
empty.innerHTML = "[create a new design]";
|
||||
empty.value = "";
|
||||
this._dom.list.appendChild(empty);
|
||||
|
||||
results.forEach(function(result) {
|
||||
var option = document.createElement("option");
|
||||
option.innerHTML = result;
|
||||
this._dom.list.appendChild(option);
|
||||
}.bind(this));
|
||||
|
||||
this._dom.list.value = this._keyword;
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
SQL.Storage.Clipboard = function(owner) {
|
||||
SQL.Storage.call(this, owner);
|
||||
this._dom.option.innerHTML = _("storage.clipboard");
|
||||
|
||||
this._buildButton("clientsave", "_save");
|
||||
this._buildButton("clientload", "_load");
|
||||
}
|
||||
SQL.Storage.Clipboard.prototype = Object.create(SQL.Storage.prototype);
|
||||
|
||||
SQL.Storage.Clipboard.prototype._save = function() {
|
||||
this.owner.getArea().value = this.owner.owner.toXML();
|
||||
}
|
||||
|
||||
SQL.Storage.Clipboard.prototype._load = function() {
|
||||
var xml = this.owner.getArea().value;
|
||||
if (!xml) {
|
||||
alert(_("empty"));
|
||||
return;
|
||||
}
|
||||
|
||||
this.owner.fromXMLText(xml);
|
||||
}
|
||||
@@ -1,150 +0,0 @@
|
||||
/**
|
||||
* The following code uses this lib: https://github.com/dropbox/dropbox-js
|
||||
*/
|
||||
SQL.Storage.Dropbox = function(owner) {
|
||||
SQL.Storage.call(this, owner);
|
||||
this._dom.option.innerHTML = _("storage.dropbox");
|
||||
|
||||
if (CONFIG.DROPBOX_KEY) { this.dropboxClient = new Dropbox.Client({ key: CONFIG.DROPBOX_KEY }); }
|
||||
|
||||
this._buildButton("dropboxsave", "_clickSave");
|
||||
this._buildButton("dropboxload", "_clickLoad");
|
||||
this._buildButton("dropboxlist", "_clickList");
|
||||
|
||||
}
|
||||
SQL.Storage.Dropbox.prototype = Object.create(SQL.Storage.prototype);
|
||||
|
||||
SQL.Storage.Dropbox.prototype.isSupported = function() {
|
||||
return !!CONFIG.DROPBOX_KEY;
|
||||
}
|
||||
|
||||
SQL.Storage.Dropbox.prototype.showDropboxError = function(error) {
|
||||
var prefix = _("Dropbox error")+": ";
|
||||
var msg = error.status;
|
||||
|
||||
switch (error.status) {
|
||||
case Dropbox.ApiError.INVALID_TOKEN:
|
||||
// If you're using dropbox.js, the only cause behind this error is that
|
||||
// the user token expired.
|
||||
// Get the user through the authentication flow again.
|
||||
msg = _("Token expired - retry the operation, authenticating again with Dropbox");
|
||||
this.dropboxClient.reset();
|
||||
break;
|
||||
|
||||
case Dropbox.ApiError.NOT_FOUND:
|
||||
// The file or folder you tried to access is not in the user's Dropbox.
|
||||
// Handling this error is specific to your application.
|
||||
msg = _("File not found");
|
||||
break;
|
||||
|
||||
case Dropbox.ApiError.OVER_QUOTA:
|
||||
// The user is over their Dropbox quota.
|
||||
// Tell them their Dropbox is full. Refreshing the page won't help.
|
||||
msg = _("Dropbox is full");
|
||||
break;
|
||||
|
||||
case Dropbox.ApiError.RATE_LIMITED:
|
||||
// Too many API requests. Tell the user to try again later.
|
||||
// Long-term, optimize your code to use fewer API calls.
|
||||
break;
|
||||
|
||||
case Dropbox.ApiError.NETWORK_ERROR:
|
||||
// An error occurred at the XMLHttpRequest layer.
|
||||
// Most likely, the user's network connection is down.
|
||||
// API calls will not succeed until the user gets back online.
|
||||
msg = _("Network error");
|
||||
break;
|
||||
|
||||
case Dropbox.ApiError.INVALID_PARAM:
|
||||
case Dropbox.ApiError.OAUTH_ERROR:
|
||||
case Dropbox.ApiError.INVALID_METHOD:
|
||||
default:
|
||||
// Caused by a bug in dropbox.js, in your application, or in Dropbox.
|
||||
// Tell the user an error occurred, ask them to refresh the page.
|
||||
}
|
||||
|
||||
alert (prefix+msg);
|
||||
};
|
||||
|
||||
SQL.Storage.Dropbox.prototype.authenticate = function(connectedCallBack) {
|
||||
if (!this.dropboxClient) return false;
|
||||
|
||||
// We want to use a popup window for authentication as the default redirection
|
||||
// won't work for us as it'll make us lose our schema data
|
||||
var href = window.location.href;
|
||||
var prefix = href.substring(0, href.lastIndexOf("/")) + "/";
|
||||
this.dropboxClient.authDriver(new Dropbox.AuthDriver.Popup({ receiverUrl: prefix+"dropbox-oauth-receiver.html" }));
|
||||
|
||||
// Now let's authenticate us
|
||||
this.dropboxClient.authenticate( function(error, client) {
|
||||
if (error) {
|
||||
this.showDropboxError(error);
|
||||
} else {
|
||||
// We're authenticated
|
||||
connectedCallBack();
|
||||
}
|
||||
}.bind(this));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
SQL.Storage.Dropbox.prototype._save = function(keyword) {
|
||||
this.authenticate( function() {
|
||||
var xml = this.owner.owner.toXML();
|
||||
var filename = keyword + ".xml";
|
||||
this.owner.owner.window.showThrobber();
|
||||
|
||||
this.dropboxClient.writeFile(filename, xml, function(error, stat) {
|
||||
this.owner.owner.window.hideThrobber();
|
||||
if (error) {
|
||||
this.showDropboxError(error);
|
||||
} else {
|
||||
this._keyword = keyword;
|
||||
this.owner.getArea().value = filename+" "+_("was saved to Dropbox");
|
||||
}
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
}
|
||||
|
||||
SQL.Storage.Dropbox.prototype._load = function(keyword) {
|
||||
this.authenticate( function() {
|
||||
var filename = keyword + ".xml";
|
||||
this.owner.owner.window.showThrobber();
|
||||
|
||||
this.dropboxClient.readFile(filename, function(error, data) {
|
||||
this.owner.owner.window.hideThrobber();
|
||||
if (error) {
|
||||
this.showDropboxError(error);
|
||||
} else {
|
||||
this.owner.fromXMLText(data);
|
||||
this._keyword = keyword;
|
||||
}
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
}
|
||||
|
||||
SQL.Storage.Dropbox.prototype._clickSave = function(e) {
|
||||
var keyword = prompt(_("serversaveprompt"), this._keyword);
|
||||
if (!keyword) { return; }
|
||||
this._save(keyword);
|
||||
}
|
||||
|
||||
SQL.Storage.Dropbox.prototype._clickLoad = function(e) {
|
||||
var keyword = prompt(_("serverloadprompt"), this._keyword);
|
||||
if (!keyword) { return; }
|
||||
this._load(keyword);
|
||||
}
|
||||
|
||||
SQL.Storage.Dropbox.prototype._clickList = function(e) {
|
||||
this.authenticate( function() {
|
||||
this.owner.owner.window.showThrobber();
|
||||
this.dropboxClient.readdir("/", function(error, entries) {
|
||||
this.owner.owner.window.hideThrobber();
|
||||
if (error) {
|
||||
this.showDropboxError(error);
|
||||
} else {
|
||||
this.owner.getArea().value = entries.join("\n")+"\n";
|
||||
}
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
SQL.Storage = function(owner) {
|
||||
this.owner = owner;
|
||||
this._keyword = "";
|
||||
this._dom = {
|
||||
option: document.createElement("option"),
|
||||
buttons: {}
|
||||
}
|
||||
}
|
||||
|
||||
SQL.Storage.prototype.getOption = function() {
|
||||
return this._dom.option;
|
||||
}
|
||||
|
||||
SQL.Storage.prototype.isSupported = function() {
|
||||
return true;
|
||||
}
|
||||
|
||||
SQL.Storage.prototype.activate = function(parent) {
|
||||
for (var p in this._dom.buttons) {
|
||||
parent.appendChild(this._dom.buttons[p]);
|
||||
}
|
||||
}
|
||||
|
||||
SQL.Storage.prototype.deactivate = function() {
|
||||
}
|
||||
|
||||
SQL.Storage.prototype.quicksave = function() {
|
||||
if (!this._keyword) { return; }
|
||||
this._save(this._keyword);
|
||||
}
|
||||
|
||||
SQL.Storage.prototype._save = function(keyword) {
|
||||
this._keyword = keyword;
|
||||
}
|
||||
|
||||
SQL.Storage.prototype._load = function(keyword) {
|
||||
this._keyword = keyword;
|
||||
}
|
||||
|
||||
SQL.Storage.prototype._buildButton = function(labelKey, method) {
|
||||
var button = document.createElement("button");
|
||||
button.innerHTML = _(labelKey);
|
||||
this._dom.buttons[labelKey] = button;
|
||||
OZ.Event.add(button, "click", this[method].bind(this));
|
||||
}
|
||||
@@ -1,129 +0,0 @@
|
||||
SQL.Storage.REST = function(owner) {
|
||||
SQL.Storage.call(this, owner);
|
||||
this._dom.option.innerHTML = _("storage.rest");
|
||||
|
||||
this._dom.label = document.createElement("label");
|
||||
this._dom.label.innerHTML = _("backendlabel");
|
||||
|
||||
this._dom.backend = document.createElement("select");
|
||||
this._dom.label.appendChild(this._dom.backend);
|
||||
this._buildButton("serversave", "_clickSave");
|
||||
this._buildButton("serverload", "_clickLoad");
|
||||
this._buildButton("serverlist", "_clickList");
|
||||
this._buildButton("serverimport", "_clickImport");
|
||||
|
||||
var bs = CONFIG.AVAILABLE_BACKENDS;
|
||||
var be = CONFIG.DEFAULT_BACKEND;
|
||||
var r = window.location.search.substring(1).match(/backend=([^&]*)/);
|
||||
if (r) {
|
||||
req = r[1];
|
||||
if (bs.indexOf(req) != -1) {
|
||||
be = req;
|
||||
}
|
||||
}
|
||||
for (var i=0;i<bs.length;i++) {
|
||||
var o = document.createElement("option");
|
||||
o.value = bs[i];
|
||||
o.innerHTML = bs[i];
|
||||
this._dom.backend.appendChild(o);
|
||||
if (bs[i] == be) { this._dom.backend.selectedIndex = i; }
|
||||
}
|
||||
|
||||
var url = window.location.href;
|
||||
var r = url.match(/keyword=([^&]+)/);
|
||||
if (r) { this._load(r[1]); }
|
||||
}
|
||||
SQL.Storage.REST.prototype = Object.create(SQL.Storage.prototype);
|
||||
|
||||
SQL.Storage.REST.prototype.activate = function(parent) {
|
||||
parent.appendChild(this._dom.label);
|
||||
SQL.Storage.prototype.activate.call(this, parent);
|
||||
}
|
||||
|
||||
SQL.Storage.REST.prototype._save = function(keyword) {
|
||||
var xml = this.owner.owner.toXML();
|
||||
var bp = this.owner.owner.getOption("xhrpath");
|
||||
var url = bp + "backend/"+this._dom.backend.value+"/?action=save&keyword="+encodeURIComponent(keyword);
|
||||
var h = {"Content-type":"application/xml"};
|
||||
this.owner.owner.window.showThrobber();
|
||||
this.owner.owner.setTitle(keyword);
|
||||
this._keyword = keyword;
|
||||
OZ.Request(url, this._responseSave.bind(this), {xml:true, method:"post", data:xml, headers:h});
|
||||
}
|
||||
|
||||
SQL.Storage.REST.prototype._load = function(keyword) {
|
||||
var bp = this.owner.owner.getOption("xhrpath");
|
||||
var url = bp + "backend/"+this._dom.backend.value+"/?action=load&keyword="+encodeURIComponent(keyword);
|
||||
this.owner.owner.window.showThrobber();
|
||||
this._keyword = keyword;
|
||||
OZ.Request(url, this._responseLoad.bind(this), {xml:true});
|
||||
}
|
||||
|
||||
SQL.Storage.REST.prototype._clickSave = function(e) {
|
||||
var keyword = prompt(_("serversaveprompt"), this._keyword);
|
||||
if (!keyword) { return; }
|
||||
this._save(keyword);
|
||||
}
|
||||
|
||||
SQL.Storage.REST.prototype._clickLoad = function(e) {
|
||||
var keyword = prompt(_("serverloadprompt"), this._keyword);
|
||||
if (!keyword) { return; }
|
||||
this._load(keyword);
|
||||
}
|
||||
|
||||
SQL.Storage.REST.prototype._clickList = function(e) {
|
||||
var bp = this.owner.owner.getOption("xhrpath");
|
||||
var url = bp + "backend/"+this._dom.backend.value+"/?action=list";
|
||||
this.owner.owner.window.showThrobber();
|
||||
OZ.Request(url, this._responseList.bind(this));
|
||||
}
|
||||
|
||||
SQL.Storage.REST.prototype._clickImport = function(e) {
|
||||
var name = prompt(_("serverimportprompt"), "");
|
||||
if (!name) { return; }
|
||||
var bp = this.owner.owner.getOption("xhrpath");
|
||||
var url = bp + "backend/"+this._dom.backend.value+"/?action=import&database="+name;
|
||||
this.owner.owner.window.showThrobber();
|
||||
OZ.Request(url, this._responseImport.bind(this), {xml:true});
|
||||
}
|
||||
|
||||
SQL.Storage.REST.prototype._check = function(code) {
|
||||
switch (code) {
|
||||
case 201:
|
||||
case 404:
|
||||
case 500:
|
||||
case 501:
|
||||
case 503:
|
||||
var lang = "http"+code;
|
||||
this.owner.getArea().value = _("httpresponse")+": "+_(lang);
|
||||
return false;
|
||||
break;
|
||||
default: return true;
|
||||
}
|
||||
}
|
||||
|
||||
SQL.Storage.REST.prototype._responseSave = function(data, code) {
|
||||
this.owner.owner.window.hideThrobber();
|
||||
this._check(code);
|
||||
}
|
||||
|
||||
SQL.Storage.REST.prototype._responseLoad = function(data, code) {
|
||||
this.owner.owner.window.hideThrobber();
|
||||
if (!this._check(code)) { return; }
|
||||
this.owner.fromXML(data);
|
||||
this.owner.owner.setTitle(this._keyword);
|
||||
}
|
||||
|
||||
SQL.Storage.REST.prototype._responseList = function(data, code) {
|
||||
this.owner.owner.window.hideThrobber();
|
||||
if (!this._check(code)) { return; }
|
||||
this.owner.getArea().value = data;
|
||||
}
|
||||
|
||||
SQL.Storage.REST.prototype._responseImport = function(data, code) {
|
||||
this.owner.owner.window.hideThrobber();
|
||||
if (!this._check(code)) { return; }
|
||||
if (this.owner.fromXML(data)) {
|
||||
this.owner.owner.alignTables();
|
||||
}
|
||||
}
|
||||
@@ -1,346 +1,396 @@
|
||||
/* --------------------- db table ------------ */
|
||||
SQL.Table = function(owner, name, x, y, z) {
|
||||
this.owner = owner;
|
||||
this.rows = [];
|
||||
this.keys = [];
|
||||
this.zIndex = 0;
|
||||
this._ec = [];
|
||||
SQL.Table = function (owner, name, x, y, z) {
|
||||
this.owner = owner;
|
||||
this.rows = [];
|
||||
this.keys = [];
|
||||
this.zIndex = 0;
|
||||
this._ec = [];
|
||||
|
||||
this.flag = false;
|
||||
this.selected = false;
|
||||
SQL.Visual.apply(this);
|
||||
this.data.comment = "";
|
||||
this.flag = false;
|
||||
this.selected = false;
|
||||
SQL.Visual.apply(this);
|
||||
this.data.comment = "";
|
||||
|
||||
this.setTitle(name);
|
||||
this.x = x || 0;
|
||||
this.y = y || 0;
|
||||
this.setZ(z);
|
||||
this.snap();
|
||||
}
|
||||
this.setTitle(name);
|
||||
this.x = x || 0;
|
||||
this.y = y || 0;
|
||||
this.setZ(z);
|
||||
this.snap();
|
||||
};
|
||||
SQL.Table.prototype = Object.create(SQL.Visual.prototype);
|
||||
|
||||
SQL.Table.prototype._build = function() {
|
||||
this.dom.container = OZ.DOM.elm("div", {className:"table"});
|
||||
this.dom.content = OZ.DOM.elm("table");
|
||||
var thead = OZ.DOM.elm("thead");
|
||||
var tr = OZ.DOM.elm("tr");
|
||||
this.dom.title = OZ.DOM.elm("td", {className:"title", colSpan:2});
|
||||
SQL.Table.prototype._build = function () {
|
||||
this.dom.container = OZ.DOM.elm("div", { className: "table" });
|
||||
this.dom.content = OZ.DOM.elm("table");
|
||||
var thead = OZ.DOM.elm("thead");
|
||||
var tr = OZ.DOM.elm("tr");
|
||||
this.dom.title = OZ.DOM.elm("td", { className: "title", colSpan: 2 });
|
||||
|
||||
OZ.DOM.append(
|
||||
[this.dom.container, this.dom.content],
|
||||
[this.dom.content, thead],
|
||||
[thead, tr],
|
||||
[tr, this.dom.title]
|
||||
);
|
||||
OZ.DOM.append(
|
||||
[this.dom.container, this.dom.content],
|
||||
[this.dom.content, thead],
|
||||
[thead, tr],
|
||||
[tr, this.dom.title]
|
||||
);
|
||||
|
||||
this.dom.mini = OZ.DOM.elm("div", {className:"mini"});
|
||||
this.owner.map.dom.container.appendChild(this.dom.mini);
|
||||
this.dom.mini = OZ.DOM.elm("div", { className: "mini" });
|
||||
this.owner.map.dom.container.appendChild(this.dom.mini);
|
||||
|
||||
this._ec.push(OZ.Event.add(this.dom.container, "click", this.click.bind(this)));
|
||||
this._ec.push(OZ.Event.add(this.dom.container, "dblclick", this.dblclick.bind(this)));
|
||||
this._ec.push(OZ.Event.add(this.dom.container, "mousedown", this.down.bind(this)));
|
||||
this._ec.push(OZ.Event.add(this.dom.container, "touchstart", this.down.bind(this)));
|
||||
this._ec.push(OZ.Event.add(this.dom.container, "touchmove", OZ.Event.prevent));
|
||||
}
|
||||
this._ec.push(
|
||||
OZ.Event.add(this.dom.container, "click", this.click.bind(this))
|
||||
);
|
||||
this._ec.push(
|
||||
OZ.Event.add(this.dom.container, "dblclick", this.dblclick.bind(this))
|
||||
);
|
||||
this._ec.push(
|
||||
OZ.Event.add(this.dom.container, "mousedown", this.down.bind(this))
|
||||
);
|
||||
this._ec.push(
|
||||
OZ.Event.add(this.dom.container, "touchstart", this.down.bind(this))
|
||||
);
|
||||
this._ec.push(
|
||||
OZ.Event.add(this.dom.container, "touchmove", OZ.Event.prevent)
|
||||
);
|
||||
};
|
||||
|
||||
SQL.Table.prototype.setTitle = function(t) {
|
||||
var old = this.getTitle();
|
||||
for (var i=0;i<this.rows.length;i++) {
|
||||
var row = this.rows[i];
|
||||
for (var j=0;j<row.relations.length;j++) {
|
||||
var r = row.relations[j];
|
||||
if (r.row1 != row) { continue; }
|
||||
var tt = row.getTitle().replace(new RegExp(old,"g"),t);
|
||||
if (tt != row.getTitle()) { row.setTitle(tt); }
|
||||
}
|
||||
}
|
||||
SQL.Visual.prototype.setTitle.apply(this, [t]);
|
||||
}
|
||||
SQL.Table.prototype.setTitle = function (t) {
|
||||
var old = this.getTitle();
|
||||
for (var i = 0; i < this.rows.length; i++) {
|
||||
var row = this.rows[i];
|
||||
for (var j = 0; j < row.relations.length; j++) {
|
||||
var r = row.relations[j];
|
||||
if (r.row1 != row) {
|
||||
continue;
|
||||
}
|
||||
var tt = row.getTitle().replace(new RegExp(old, "g"), t);
|
||||
if (tt != row.getTitle()) {
|
||||
row.setTitle(tt);
|
||||
}
|
||||
}
|
||||
}
|
||||
SQL.Visual.prototype.setTitle.apply(this, [t]);
|
||||
};
|
||||
|
||||
SQL.Table.prototype.getRelations = function() {
|
||||
var arr = [];
|
||||
for (var i=0;i<this.rows.length;i++) {
|
||||
var row = this.rows[i];
|
||||
for (var j=0;j<row.relations.length;j++) {
|
||||
var r = row.relations[j];
|
||||
if (arr.indexOf(r) == -1) { arr.push(r); }
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
SQL.Table.prototype.getRelations = function () {
|
||||
var arr = [];
|
||||
for (var i = 0; i < this.rows.length; i++) {
|
||||
var row = this.rows[i];
|
||||
for (var j = 0; j < row.relations.length; j++) {
|
||||
var r = row.relations[j];
|
||||
if (arr.indexOf(r) == -1) {
|
||||
arr.push(r);
|
||||
}
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
|
||||
SQL.Table.prototype.showRelations = function() {
|
||||
var rs = this.getRelations();
|
||||
for (var i=0;i<rs.length;i++) { rs[i].show(); }
|
||||
}
|
||||
SQL.Table.prototype.showRelations = function () {
|
||||
var rs = this.getRelations();
|
||||
for (var i = 0; i < rs.length; i++) {
|
||||
rs[i].show();
|
||||
}
|
||||
};
|
||||
|
||||
SQL.Table.prototype.hideRelations = function() {
|
||||
var rs = this.getRelations();
|
||||
for (var i=0;i<rs.length;i++) { rs[i].hide(); }
|
||||
}
|
||||
SQL.Table.prototype.hideRelations = function () {
|
||||
var rs = this.getRelations();
|
||||
for (var i = 0; i < rs.length; i++) {
|
||||
rs[i].hide();
|
||||
}
|
||||
};
|
||||
|
||||
SQL.Table.prototype.click = function(e) {
|
||||
OZ.Event.stop(e);
|
||||
var t = OZ.Event.target(e);
|
||||
this.owner.tableManager.select(this);
|
||||
SQL.Table.prototype.click = function (e) {
|
||||
OZ.Event.stop(e);
|
||||
var t = OZ.Event.target(e);
|
||||
this.owner.tableManager.select(this);
|
||||
|
||||
if (t != this.dom.title) { return; } /* click on row */
|
||||
if (t != this.dom.title) {
|
||||
return;
|
||||
} /* click on row */
|
||||
|
||||
SQL.publish("tableclick", this);
|
||||
this.owner.rowManager.select(false);
|
||||
}
|
||||
SQL.publish("tableclick", this);
|
||||
this.owner.rowManager.select(false);
|
||||
};
|
||||
|
||||
SQL.Table.prototype.dblclick = function(e) {
|
||||
var t = OZ.Event.target(e);
|
||||
if (t == this.dom.title) { this.owner.tableManager.edit(); }
|
||||
}
|
||||
SQL.Table.prototype.dblclick = function (e) {
|
||||
var t = OZ.Event.target(e);
|
||||
if (t == this.dom.title) {
|
||||
this.owner.tableManager.edit();
|
||||
}
|
||||
};
|
||||
|
||||
SQL.Table.prototype.select = function() {
|
||||
if (this.selected) { return; }
|
||||
this.selected = true;
|
||||
OZ.DOM.addClass(this.dom.container, "selected");
|
||||
OZ.DOM.addClass(this.dom.mini, "mini_selected");
|
||||
this.redraw();
|
||||
}
|
||||
SQL.Table.prototype.select = function () {
|
||||
if (this.selected) {
|
||||
return;
|
||||
}
|
||||
this.selected = true;
|
||||
OZ.DOM.addClass(this.dom.container, "selected");
|
||||
OZ.DOM.addClass(this.dom.mini, "mini_selected");
|
||||
this.redraw();
|
||||
};
|
||||
|
||||
SQL.Table.prototype.deselect = function() {
|
||||
if (!this.selected) { return; }
|
||||
this.selected = false;
|
||||
OZ.DOM.removeClass(this.dom.container, "selected");
|
||||
OZ.DOM.removeClass(this.dom.mini, "mini_selected");
|
||||
this.redraw();
|
||||
}
|
||||
SQL.Table.prototype.deselect = function () {
|
||||
if (!this.selected) {
|
||||
return;
|
||||
}
|
||||
this.selected = false;
|
||||
OZ.DOM.removeClass(this.dom.container, "selected");
|
||||
OZ.DOM.removeClass(this.dom.mini, "mini_selected");
|
||||
this.redraw();
|
||||
};
|
||||
|
||||
SQL.Table.prototype.addRow = function(title, data) {
|
||||
var r = new SQL.Row(this, title, data);
|
||||
this.rows.push(r);
|
||||
this.dom.content.appendChild(r.dom.container);
|
||||
this.redraw();
|
||||
return r;
|
||||
}
|
||||
SQL.Table.prototype.addRow = function (title, data) {
|
||||
var r = new SQL.Row(this, title, data);
|
||||
this.rows.push(r);
|
||||
this.dom.content.appendChild(r.dom.container);
|
||||
this.redraw();
|
||||
return r;
|
||||
};
|
||||
|
||||
SQL.Table.prototype.removeRow = function(r) {
|
||||
var idx = this.rows.indexOf(r);
|
||||
if (idx == -1) { return; }
|
||||
r.destroy();
|
||||
this.rows.splice(idx,1);
|
||||
this.redraw();
|
||||
}
|
||||
SQL.Table.prototype.removeRow = function (r) {
|
||||
var idx = this.rows.indexOf(r);
|
||||
if (idx == -1) {
|
||||
return;
|
||||
}
|
||||
r.destroy();
|
||||
this.rows.splice(idx, 1);
|
||||
this.redraw();
|
||||
};
|
||||
|
||||
SQL.Table.prototype.addKey = function(name) {
|
||||
var k = new SQL.Key(this, name);
|
||||
this.keys.push(k);
|
||||
return k;
|
||||
}
|
||||
SQL.Table.prototype.addKey = function (name) {
|
||||
var k = new SQL.Key(this, name);
|
||||
this.keys.push(k);
|
||||
return k;
|
||||
};
|
||||
|
||||
SQL.Table.prototype.removeKey = function(k) {
|
||||
var idx = this.keys.indexOf(k);
|
||||
if (idx == -1) { return; }
|
||||
k.destroy();
|
||||
this.keys.splice(idx,1);
|
||||
}
|
||||
SQL.Table.prototype.removeKey = function (k) {
|
||||
var idx = this.keys.indexOf(k);
|
||||
if (idx == -1) {
|
||||
return;
|
||||
}
|
||||
k.destroy();
|
||||
this.keys.splice(idx, 1);
|
||||
};
|
||||
|
||||
SQL.Table.prototype.redraw = function() {
|
||||
var x = this.x;
|
||||
var y = this.y;
|
||||
if (this.selected) { x--; y--; }
|
||||
this.dom.container.style.left = x+"px";
|
||||
this.dom.container.style.top = y+"px";
|
||||
SQL.Table.prototype.redraw = function () {
|
||||
var x = this.x;
|
||||
var y = this.y;
|
||||
if (this.selected) {
|
||||
x--;
|
||||
y--;
|
||||
}
|
||||
this.dom.container.style.left = x + "px";
|
||||
this.dom.container.style.top = y + "px";
|
||||
|
||||
var ratioX = this.owner.map.width / this.owner.width;
|
||||
var ratioY = this.owner.map.height / this.owner.height;
|
||||
var ratioX = this.owner.map.width / this.owner.width;
|
||||
var ratioY = this.owner.map.height / this.owner.height;
|
||||
|
||||
var w = this.dom.container.offsetWidth * ratioX;
|
||||
var h = this.dom.container.offsetHeight * ratioY;
|
||||
var x = this.x * ratioX;
|
||||
var y = this.y * ratioY;
|
||||
var w = this.dom.container.offsetWidth * ratioX;
|
||||
var h = this.dom.container.offsetHeight * ratioY;
|
||||
var x = this.x * ratioX;
|
||||
var y = this.y * ratioY;
|
||||
|
||||
this.dom.mini.style.width = Math.round(w)+"px";
|
||||
this.dom.mini.style.height = Math.round(h)+"px";
|
||||
this.dom.mini.style.left = Math.round(x)+"px";
|
||||
this.dom.mini.style.top = Math.round(y)+"px";
|
||||
this.dom.mini.style.width = Math.round(w) + "px";
|
||||
this.dom.mini.style.height = Math.round(h) + "px";
|
||||
this.dom.mini.style.left = Math.round(x) + "px";
|
||||
this.dom.mini.style.top = Math.round(y) + "px";
|
||||
|
||||
this.width = this.dom.container.offsetWidth;
|
||||
this.height = this.dom.container.offsetHeight;
|
||||
this.width = this.dom.container.offsetWidth;
|
||||
this.height = this.dom.container.offsetHeight;
|
||||
|
||||
var rs = this.getRelations();
|
||||
for (var i=0;i<rs.length;i++) { rs[i].redraw(); }
|
||||
}
|
||||
var rs = this.getRelations();
|
||||
for (var i = 0; i < rs.length; i++) {
|
||||
rs[i].redraw();
|
||||
}
|
||||
};
|
||||
|
||||
SQL.Table.prototype.moveBy = function(dx, dy) {
|
||||
this.x += dx;
|
||||
this.y += dy;
|
||||
SQL.Table.prototype.moveBy = function (dx, dy) {
|
||||
this.x += dx;
|
||||
this.y += dy;
|
||||
|
||||
this.snap();
|
||||
this.redraw();
|
||||
}
|
||||
this.snap();
|
||||
this.redraw();
|
||||
};
|
||||
|
||||
SQL.Table.prototype.moveTo = function(x, y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
SQL.Table.prototype.moveTo = function (x, y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
|
||||
this.snap();
|
||||
this.redraw();
|
||||
}
|
||||
this.snap();
|
||||
this.redraw();
|
||||
};
|
||||
|
||||
SQL.Table.prototype.snap = function() {
|
||||
var snap = parseInt(SQL.Designer.getOption("snap"));
|
||||
if (snap) {
|
||||
this.x = Math.round(this.x / snap) * snap;
|
||||
this.y = Math.round(this.y / snap) * snap;
|
||||
}
|
||||
}
|
||||
SQL.Table.prototype.snap = function () {
|
||||
var snap = parseInt(SQL.Designer.getOption("snap"));
|
||||
if (snap) {
|
||||
this.x = Math.round(this.x / snap) * snap;
|
||||
this.y = Math.round(this.y / snap) * snap;
|
||||
}
|
||||
};
|
||||
|
||||
SQL.Table.prototype.down = function(e) { /* mousedown - start drag */
|
||||
OZ.Event.stop(e);
|
||||
var t = OZ.Event.target(e);
|
||||
if (t != this.dom.title) { return; } /* on a row */
|
||||
SQL.Table.prototype.down = function (e) {
|
||||
/* mousedown - start drag */
|
||||
OZ.Event.stop(e);
|
||||
var t = OZ.Event.target(e);
|
||||
if (t != this.dom.title) {
|
||||
return;
|
||||
} /* on a row */
|
||||
|
||||
/* touch? */
|
||||
if (e.type == "touchstart") {
|
||||
var event = e.touches[0];
|
||||
var moveEvent = "touchmove";
|
||||
var upEvent = "touchend";
|
||||
} else {
|
||||
var event = e;
|
||||
var moveEvent = "mousemove";
|
||||
var upEvent = "mouseup";
|
||||
}
|
||||
/* touch? */
|
||||
if (e.type == "touchstart") {
|
||||
var event = e.touches[0];
|
||||
var moveEvent = "touchmove";
|
||||
var upEvent = "touchend";
|
||||
} else {
|
||||
var event = e;
|
||||
var moveEvent = "mousemove";
|
||||
var upEvent = "mouseup";
|
||||
}
|
||||
|
||||
/* a non-shift click within a selection preserves the selection */
|
||||
if (e.shiftKey || ! this.selected) {
|
||||
this.owner.tableManager.select(this, e.shiftKey);
|
||||
}
|
||||
/* a non-shift click within a selection preserves the selection */
|
||||
if (e.shiftKey || !this.selected) {
|
||||
this.owner.tableManager.select(this, e.shiftKey);
|
||||
}
|
||||
|
||||
var t = SQL.Table;
|
||||
t.active = this.owner.tableManager.selection;
|
||||
var n = t.active.length;
|
||||
t.x = new Array(n);
|
||||
t.y = new Array(n);
|
||||
for (var i=0;i<n;i++) {
|
||||
/* position relative to mouse cursor */
|
||||
t.x[i] = t.active[i].x - event.clientX;
|
||||
t.y[i] = t.active[i].y - event.clientY;
|
||||
}
|
||||
var t = SQL.Table;
|
||||
t.active = this.owner.tableManager.selection;
|
||||
var n = t.active.length;
|
||||
t.x = new Array(n);
|
||||
t.y = new Array(n);
|
||||
for (var i = 0; i < n; i++) {
|
||||
/* position relative to mouse cursor */
|
||||
t.x[i] = t.active[i].x - event.clientX;
|
||||
t.y[i] = t.active[i].y - event.clientY;
|
||||
}
|
||||
|
||||
if (this.owner.getOption("hide")) {
|
||||
for (var i=0;i<n;i++) {
|
||||
t.active[i].hideRelations();
|
||||
}
|
||||
}
|
||||
if (this.owner.getOption("hide")) {
|
||||
for (var i = 0; i < n; i++) {
|
||||
t.active[i].hideRelations();
|
||||
}
|
||||
}
|
||||
|
||||
this.documentMove = OZ.Event.add(document, moveEvent, this.move.bind(this));
|
||||
this.documentUp = OZ.Event.add(document, upEvent, this.up.bind(this));
|
||||
}
|
||||
this.documentMove = OZ.Event.add(document, moveEvent, this.move.bind(this));
|
||||
this.documentUp = OZ.Event.add(document, upEvent, this.up.bind(this));
|
||||
};
|
||||
|
||||
SQL.Table.prototype.toXML = function() {
|
||||
var t = this.getTitle().replace(/"/g,""");
|
||||
var xml = "";
|
||||
xml += '<table x="'+this.x+'" y="'+this.y+'" name="'+t+'">\n';
|
||||
for (var i=0;i<this.rows.length;i++) {
|
||||
xml += this.rows[i].toXML();
|
||||
}
|
||||
for (var i=0;i<this.keys.length;i++) {
|
||||
xml += this.keys[i].toXML();
|
||||
}
|
||||
var c = this.getComment();
|
||||
if (c) {
|
||||
xml += "<comment>"+SQL.escape(c)+"</comment>\n";
|
||||
}
|
||||
xml += "</table>\n";
|
||||
return xml;
|
||||
}
|
||||
SQL.Table.prototype.toXML = function () {
|
||||
var t = this.getTitle().replace(/"/g, """);
|
||||
var xml = "";
|
||||
xml += '<table x="' + this.x + '" y="' + this.y + '" name="' + t + '">\n';
|
||||
for (var i = 0; i < this.rows.length; i++) {
|
||||
xml += this.rows[i].toXML();
|
||||
}
|
||||
for (var i = 0; i < this.keys.length; i++) {
|
||||
xml += this.keys[i].toXML();
|
||||
}
|
||||
var c = this.getComment();
|
||||
if (c) {
|
||||
xml += "<comment>" + SQL.escape(c) + "</comment>\n";
|
||||
}
|
||||
xml += "</table>\n";
|
||||
return xml;
|
||||
};
|
||||
|
||||
SQL.Table.prototype.fromXML = function(node) {
|
||||
var name = node.getAttribute("name");
|
||||
this.setTitle(name);
|
||||
var x = parseInt(node.getAttribute("x")) || 0;
|
||||
var y = parseInt(node.getAttribute("y")) || 0;
|
||||
this.moveTo(x, y);
|
||||
var rows = node.getElementsByTagName("row");
|
||||
for (var i=0;i<rows.length;i++) {
|
||||
var row = rows[i];
|
||||
var r = this.addRow("");
|
||||
r.fromXML(row);
|
||||
}
|
||||
var keys = node.getElementsByTagName("key");
|
||||
for (var i=0;i<keys.length;i++) {
|
||||
var key = keys[i];
|
||||
var k = this.addKey();
|
||||
k.fromXML(key);
|
||||
}
|
||||
for (var i=0;i<node.childNodes.length;i++) {
|
||||
var ch = node.childNodes[i];
|
||||
if (ch.tagName && ch.tagName.toLowerCase() == "comment" && ch.firstChild) {
|
||||
this.setComment(ch.firstChild.nodeValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
SQL.Table.prototype.fromXML = function (node) {
|
||||
var name = node.getAttribute("name");
|
||||
this.setTitle(name);
|
||||
var x = parseInt(node.getAttribute("x")) || 0;
|
||||
var y = parseInt(node.getAttribute("y")) || 0;
|
||||
this.moveTo(x, y);
|
||||
var rows = node.getElementsByTagName("row");
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var row = rows[i];
|
||||
var r = this.addRow("");
|
||||
r.fromXML(row);
|
||||
}
|
||||
var keys = node.getElementsByTagName("key");
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
var key = keys[i];
|
||||
var k = this.addKey();
|
||||
k.fromXML(key);
|
||||
}
|
||||
for (var i = 0; i < node.childNodes.length; i++) {
|
||||
var ch = node.childNodes[i];
|
||||
if (
|
||||
ch.tagName &&
|
||||
ch.tagName.toLowerCase() == "comment" &&
|
||||
ch.firstChild
|
||||
) {
|
||||
this.setComment(ch.firstChild.nodeValue);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
SQL.Table.prototype.getZ = function() {
|
||||
return this.zIndex;
|
||||
}
|
||||
SQL.Table.prototype.getZ = function () {
|
||||
return this.zIndex;
|
||||
};
|
||||
|
||||
SQL.Table.prototype.setZ = function(z) {
|
||||
this.zIndex = z;
|
||||
this.dom.container.style.zIndex = z;
|
||||
}
|
||||
SQL.Table.prototype.setZ = function (z) {
|
||||
this.zIndex = z;
|
||||
this.dom.container.style.zIndex = z;
|
||||
};
|
||||
|
||||
SQL.Table.prototype.findNamedRow = function(n) { /* return row with a given name */
|
||||
for (var i=0;i<this.rows.length;i++) {
|
||||
if (this.rows[i].getTitle() == n) { return this.rows[i]; }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
SQL.Table.prototype.findNamedRow = function (n) {
|
||||
/* return row with a given name */
|
||||
for (var i = 0; i < this.rows.length; i++) {
|
||||
if (this.rows[i].getTitle() == n) {
|
||||
return this.rows[i];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
SQL.Table.prototype.setComment = function(c) {
|
||||
this.data.comment = c;
|
||||
this.dom.title.title = this.data.comment;
|
||||
}
|
||||
SQL.Table.prototype.setComment = function (c) {
|
||||
this.data.comment = c;
|
||||
this.dom.title.title = this.data.comment;
|
||||
};
|
||||
|
||||
SQL.Table.prototype.getComment = function() {
|
||||
return this.data.comment;
|
||||
}
|
||||
SQL.Table.prototype.getComment = function () {
|
||||
return this.data.comment;
|
||||
};
|
||||
|
||||
SQL.Table.prototype.move = function(e) { /* mousemove */
|
||||
var t = SQL.Table;
|
||||
SQL.Designer.removeSelection();
|
||||
if (e.type == "touchmove") {
|
||||
if (e.touches.length > 1) { return; }
|
||||
var event = e.touches[0];
|
||||
} else {
|
||||
var event = e;
|
||||
}
|
||||
SQL.Table.prototype.move = function (e) {
|
||||
/* mousemove */
|
||||
var t = SQL.Table;
|
||||
SQL.Designer.removeSelection();
|
||||
if (e.type == "touchmove") {
|
||||
if (e.touches.length > 1) {
|
||||
return;
|
||||
}
|
||||
var event = e.touches[0];
|
||||
} else {
|
||||
var event = e;
|
||||
}
|
||||
|
||||
for (var i=0;i<t.active.length;i++) {
|
||||
var x = t.x[i] + event.clientX;
|
||||
var y = t.y[i] + event.clientY;
|
||||
x = Math.max(x, 0);
|
||||
y = Math.max(y, 0);
|
||||
t.active[i].moveTo(x,y);
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < t.active.length; i++) {
|
||||
var x = t.x[i] + event.clientX;
|
||||
var y = t.y[i] + event.clientY;
|
||||
x = Math.max(x, 0);
|
||||
y = Math.max(y, 0);
|
||||
t.active[i].moveTo(x, y);
|
||||
}
|
||||
};
|
||||
|
||||
SQL.Table.prototype.up = function(e) {
|
||||
var t = SQL.Table;
|
||||
var d = SQL.Designer;
|
||||
if (d.getOption("hide")) {
|
||||
for (var i=0;i<t.active.length;i++) {
|
||||
t.active[i].showRelations();
|
||||
t.active[i].redraw();
|
||||
}
|
||||
}
|
||||
t.active = false;
|
||||
OZ.Event.remove(this.documentMove);
|
||||
OZ.Event.remove(this.documentUp);
|
||||
this.owner.sync();
|
||||
}
|
||||
SQL.Table.prototype.up = function (e) {
|
||||
var t = SQL.Table;
|
||||
var d = SQL.Designer;
|
||||
if (d.getOption("hide")) {
|
||||
for (var i = 0; i < t.active.length; i++) {
|
||||
t.active[i].showRelations();
|
||||
t.active[i].redraw();
|
||||
}
|
||||
}
|
||||
t.active = false;
|
||||
OZ.Event.remove(this.documentMove);
|
||||
OZ.Event.remove(this.documentUp);
|
||||
this.owner.sync();
|
||||
};
|
||||
|
||||
SQL.Table.prototype.destroy = function() {
|
||||
SQL.Visual.prototype.destroy.apply(this);
|
||||
this.dom.mini.parentNode.removeChild(this.dom.mini);
|
||||
while (this.rows.length) {
|
||||
this.removeRow(this.rows[0]);
|
||||
}
|
||||
this._ec.forEach(OZ.Event.remove, OZ.Event);
|
||||
}
|
||||
SQL.Table.prototype.destroy = function () {
|
||||
SQL.Visual.prototype.destroy.apply(this);
|
||||
this.dom.mini.parentNode.removeChild(this.dom.mini);
|
||||
while (this.rows.length) {
|
||||
this.removeRow(this.rows[0]);
|
||||
}
|
||||
this._ec.forEach(OZ.Event.remove, OZ.Event);
|
||||
};
|
||||
|
||||
@@ -1,209 +1,257 @@
|
||||
/* --------------------- table manager ------------ */
|
||||
|
||||
SQL.TableManager = function(owner) {
|
||||
this.owner = owner;
|
||||
this.dom = {
|
||||
container:OZ.$("table"),
|
||||
name:OZ.$("tablename"),
|
||||
comment:OZ.$("tablecomment")
|
||||
};
|
||||
this.selection = [];
|
||||
this.adding = false;
|
||||
SQL.TableManager = function (owner) {
|
||||
this.owner = owner;
|
||||
this.dom = {
|
||||
container: OZ.$("table"),
|
||||
name: OZ.$("tablename"),
|
||||
comment: OZ.$("tablecomment"),
|
||||
};
|
||||
this.selection = [];
|
||||
this.adding = false;
|
||||
|
||||
var ids = ["addtable","removetable","aligntables","cleartables","addrow","edittable","tablekeys"];
|
||||
for (var i=0;i<ids.length;i++) {
|
||||
var id = ids[i];
|
||||
var elm = OZ.$(id);
|
||||
this.dom[id] = elm;
|
||||
elm.value = _(id);
|
||||
}
|
||||
var ids = [
|
||||
"addtable",
|
||||
"removetable",
|
||||
"aligntables",
|
||||
"cleartables",
|
||||
"addrow",
|
||||
"edittable",
|
||||
"tablekeys",
|
||||
];
|
||||
for (var i = 0; i < ids.length; i++) {
|
||||
var id = ids[i];
|
||||
var elm = OZ.$(id);
|
||||
this.dom[id] = elm;
|
||||
elm.value = _(id);
|
||||
}
|
||||
|
||||
var ids = ["tablenamelabel","tablecommentlabel"];
|
||||
for (var i=0;i<ids.length;i++) {
|
||||
var id = ids[i];
|
||||
var elm = OZ.$(id);
|
||||
elm.innerHTML = _(id);
|
||||
}
|
||||
var ids = ["tablenamelabel", "tablecommentlabel"];
|
||||
for (var i = 0; i < ids.length; i++) {
|
||||
var id = ids[i];
|
||||
var elm = OZ.$(id);
|
||||
elm.innerHTML = _(id);
|
||||
}
|
||||
|
||||
this.select(false);
|
||||
|
||||
this.select(false);
|
||||
this.save = this.save.bind(this);
|
||||
|
||||
this.save = this.save.bind(this);
|
||||
OZ.Event.add("area", "click", this.click.bind(this));
|
||||
OZ.Event.add(this.dom.addtable, "click", this.preAdd.bind(this));
|
||||
OZ.Event.add(this.dom.removetable, "click", this.remove.bind(this));
|
||||
OZ.Event.add(this.dom.cleartables, "click", this.clear.bind(this));
|
||||
OZ.Event.add(this.dom.addrow, "click", this.addRow.bind(this));
|
||||
OZ.Event.add(
|
||||
this.dom.aligntables,
|
||||
"click",
|
||||
this.owner.alignTables.bind(this.owner)
|
||||
);
|
||||
OZ.Event.add(this.dom.edittable, "click", this.edit.bind(this));
|
||||
OZ.Event.add(this.dom.tablekeys, "click", this.keys.bind(this));
|
||||
OZ.Event.add(document, "keydown", this.press.bind(this));
|
||||
|
||||
OZ.Event.add("area", "click", this.click.bind(this));
|
||||
OZ.Event.add(this.dom.addtable, "click", this.preAdd.bind(this));
|
||||
OZ.Event.add(this.dom.removetable, "click", this.remove.bind(this));
|
||||
OZ.Event.add(this.dom.cleartables, "click", this.clear.bind(this));
|
||||
OZ.Event.add(this.dom.addrow, "click", this.addRow.bind(this));
|
||||
OZ.Event.add(this.dom.aligntables, "click", this.owner.alignTables.bind(this.owner));
|
||||
OZ.Event.add(this.dom.edittable, "click", this.edit.bind(this));
|
||||
OZ.Event.add(this.dom.tablekeys, "click", this.keys.bind(this));
|
||||
OZ.Event.add(window, "keydown", this.press.bind(this));
|
||||
this.dom.container.parentNode.removeChild(this.dom.container);
|
||||
};
|
||||
|
||||
this.dom.container.parentNode.removeChild(this.dom.container);
|
||||
}
|
||||
SQL.TableManager.prototype.addRow = function (e) {
|
||||
var newrow = this.selection[0].addRow(_("newrow"));
|
||||
this.owner.rowManager.select(newrow);
|
||||
newrow.expand();
|
||||
};
|
||||
|
||||
SQL.TableManager.prototype.addRow = function(e) {
|
||||
var newrow = this.selection[0].addRow(_("newrow"));
|
||||
this.owner.rowManager.select(newrow);
|
||||
newrow.expand();
|
||||
}
|
||||
SQL.TableManager.prototype.select = function (table, multi) {
|
||||
/* activate table */
|
||||
if (table) {
|
||||
if (multi) {
|
||||
var i = this.selection.indexOf(table);
|
||||
if (i < 0) {
|
||||
this.selection.push(table);
|
||||
} else {
|
||||
this.selection.splice(i, 1);
|
||||
}
|
||||
} else {
|
||||
if (this.selection[0] === table) {
|
||||
return;
|
||||
}
|
||||
this.selection = [table];
|
||||
}
|
||||
} else {
|
||||
this.selection = [];
|
||||
}
|
||||
this.processSelection();
|
||||
};
|
||||
|
||||
SQL.TableManager.prototype.select = function(table, multi) { /* activate table */
|
||||
if (table) {
|
||||
if (multi) {
|
||||
var i = this.selection.indexOf(table);
|
||||
if (i < 0) {
|
||||
this.selection.push(table);
|
||||
} else {
|
||||
this.selection.splice(i, 1);
|
||||
}
|
||||
} else {
|
||||
if (this.selection[0] === table) { return; }
|
||||
this.selection = [table];
|
||||
}
|
||||
} else {
|
||||
this.selection = [];
|
||||
}
|
||||
this.processSelection();
|
||||
}
|
||||
SQL.TableManager.prototype.processSelection = function () {
|
||||
var tables = this.owner.tables;
|
||||
for (var i = 0; i < tables.length; i++) {
|
||||
tables[i].deselect();
|
||||
}
|
||||
if (this.selection.length == 1) {
|
||||
this.dom.addrow.disabled = false;
|
||||
this.dom.edittable.disabled = false;
|
||||
this.dom.tablekeys.disabled = false;
|
||||
this.dom.removetable.value = _("removetable");
|
||||
} else {
|
||||
this.dom.addrow.disabled = true;
|
||||
this.dom.edittable.disabled = true;
|
||||
this.dom.tablekeys.disabled = true;
|
||||
}
|
||||
if (this.selection.length) {
|
||||
this.dom.removetable.disabled = false;
|
||||
if (this.selection.length > 1) {
|
||||
this.dom.removetable.value = _("removetables");
|
||||
}
|
||||
} else {
|
||||
this.dom.removetable.disabled = true;
|
||||
this.dom.removetable.value = _("removetable");
|
||||
}
|
||||
for (var i = 0; i < this.selection.length; i++) {
|
||||
var t = this.selection[i];
|
||||
t.owner.raise(t);
|
||||
t.select();
|
||||
}
|
||||
};
|
||||
|
||||
SQL.TableManager.prototype.processSelection = function() {
|
||||
var tables = this.owner.tables;
|
||||
for (var i=0;i<tables.length;i++) {
|
||||
tables[i].deselect();
|
||||
}
|
||||
if (this.selection.length == 1) {
|
||||
this.dom.addrow.disabled = false;
|
||||
this.dom.edittable.disabled = false;
|
||||
this.dom.tablekeys.disabled = false;
|
||||
this.dom.removetable.value = _("removetable");
|
||||
} else {
|
||||
this.dom.addrow.disabled = true;
|
||||
this.dom.edittable.disabled = true;
|
||||
this.dom.tablekeys.disabled = true;
|
||||
}
|
||||
if (this.selection.length) {
|
||||
this.dom.removetable.disabled = false;
|
||||
if (this.selection.length > 1) { this.dom.removetable.value = _("removetables"); }
|
||||
} else {
|
||||
this.dom.removetable.disabled = true;
|
||||
this.dom.removetable.value = _("removetable");
|
||||
}
|
||||
for (var i=0;i<this.selection.length;i++) {
|
||||
var t = this.selection[i];
|
||||
t.owner.raise(t);
|
||||
t.select();
|
||||
}
|
||||
}
|
||||
SQL.TableManager.prototype.selectRect = function (x, y, width, height) {
|
||||
/* select all tables intersecting a rectangle */
|
||||
this.selection = [];
|
||||
var tables = this.owner.tables;
|
||||
var x1 = x + width;
|
||||
var y1 = y + height;
|
||||
for (var i = 0; i < tables.length; i++) {
|
||||
var t = tables[i];
|
||||
var tx = t.x;
|
||||
var tx1 = t.x + t.width;
|
||||
var ty = t.y;
|
||||
var ty1 = t.y + t.height;
|
||||
if (
|
||||
((tx >= x && tx < x1) ||
|
||||
(tx1 >= x && tx1 < x1) ||
|
||||
(tx < x && tx1 > x1)) &&
|
||||
((ty >= y && ty < y1) ||
|
||||
(ty1 >= y && ty1 < y1) ||
|
||||
(ty < y && ty1 > y1))
|
||||
) {
|
||||
this.selection.push(t);
|
||||
}
|
||||
}
|
||||
this.processSelection();
|
||||
};
|
||||
|
||||
SQL.TableManager.prototype.selectRect = function(x,y,width,height) { /* select all tables intersecting a rectangle */
|
||||
this.selection = [];
|
||||
var tables = this.owner.tables;
|
||||
var x1 = x+width;
|
||||
var y1 = y+height;
|
||||
for (var i=0;i<tables.length;i++) {
|
||||
var t = tables[i];
|
||||
var tx = t.x;
|
||||
var tx1 = t.x+t.width;
|
||||
var ty = t.y;
|
||||
var ty1 = t.y+t.height;
|
||||
if (((tx>=x && tx<x1) || (tx1>=x && tx1<x1) || (tx<x && tx1>x1)) &&
|
||||
((ty>=y && ty<y1) || (ty1>=y && ty1<y1) || (ty<y && ty1>y1)))
|
||||
{ this.selection.push(t); }
|
||||
}
|
||||
this.processSelection();
|
||||
}
|
||||
SQL.TableManager.prototype.click = function (e) {
|
||||
/* finish adding new table */
|
||||
var newtable = false;
|
||||
if (this.adding) {
|
||||
this.adding = false;
|
||||
OZ.DOM.removeClass("area", "adding");
|
||||
this.dom.addtable.value = this.oldvalue;
|
||||
var scroll = OZ.DOM.scroll();
|
||||
var x = e.clientX + scroll[0];
|
||||
var y = e.clientY + scroll[1];
|
||||
newtable = this.owner.addTable(_("newtable"), x, y);
|
||||
var r = newtable.addRow("id", { ai: true });
|
||||
var k = newtable.addKey("PRIMARY", "");
|
||||
k.addRow(r);
|
||||
}
|
||||
this.select(newtable);
|
||||
this.owner.rowManager.select(false);
|
||||
if (this.selection.length == 1) {
|
||||
this.edit(e);
|
||||
}
|
||||
};
|
||||
|
||||
SQL.TableManager.prototype.click = function(e) { /* finish adding new table */
|
||||
var newtable = false;
|
||||
if (this.adding) {
|
||||
this.adding = false;
|
||||
OZ.DOM.removeClass("area","adding");
|
||||
this.dom.addtable.value = this.oldvalue;
|
||||
var scroll = OZ.DOM.scroll();
|
||||
var x = e.clientX + scroll[0];
|
||||
var y = e.clientY + scroll[1];
|
||||
newtable = this.owner.addTable(_("newtable"),x,y);
|
||||
var r = newtable.addRow("id",{ai:true});
|
||||
var k = newtable.addKey("PRIMARY","");
|
||||
k.addRow(r);
|
||||
}
|
||||
this.select(newtable);
|
||||
this.owner.rowManager.select(false);
|
||||
if (this.selection.length == 1) { this.edit(e); }
|
||||
}
|
||||
SQL.TableManager.prototype.preAdd = function (e) {
|
||||
/* click add new table */
|
||||
if (this.adding) {
|
||||
this.adding = false;
|
||||
OZ.DOM.removeClass("area", "adding");
|
||||
this.dom.addtable.value = this.oldvalue;
|
||||
} else {
|
||||
this.adding = true;
|
||||
OZ.DOM.addClass("area", "adding");
|
||||
this.oldvalue = this.dom.addtable.value;
|
||||
this.dom.addtable.value = "[" + _("addpending") + "]";
|
||||
}
|
||||
};
|
||||
|
||||
SQL.TableManager.prototype.preAdd = function(e) { /* click add new table */
|
||||
if (this.adding) {
|
||||
this.adding = false;
|
||||
OZ.DOM.removeClass("area","adding");
|
||||
this.dom.addtable.value = this.oldvalue;
|
||||
} else {
|
||||
this.adding = true;
|
||||
OZ.DOM.addClass("area","adding");
|
||||
this.oldvalue = this.dom.addtable.value;
|
||||
this.dom.addtable.value = "["+_("addpending")+"]";
|
||||
}
|
||||
}
|
||||
SQL.TableManager.prototype.clear = function (e) {
|
||||
/* remove all tables */
|
||||
if (!this.owner.tables.length) {
|
||||
return;
|
||||
}
|
||||
var result = confirm(_("confirmall") + " ?");
|
||||
if (!result) {
|
||||
return;
|
||||
}
|
||||
this.owner.clearTables();
|
||||
};
|
||||
|
||||
SQL.TableManager.prototype.clear = function(e) { /* remove all tables */
|
||||
if (!this.owner.tables.length) { return; }
|
||||
var result = confirm(_("confirmall")+" ?");
|
||||
if (!result) { return; }
|
||||
this.owner.clearTables();
|
||||
}
|
||||
SQL.TableManager.prototype.remove = function (e) {
|
||||
var titles = this.selection.slice(0);
|
||||
for (var i = 0; i < titles.length; i++) {
|
||||
titles[i] = "'" + titles[i].getTitle() + "'";
|
||||
}
|
||||
var result = confirm(_("confirmtable") + " " + titles.join(", ") + "?");
|
||||
if (!result) {
|
||||
return;
|
||||
}
|
||||
var sel = this.selection.slice(0);
|
||||
for (var i = 0; i < sel.length; i++) {
|
||||
this.owner.removeTable(sel[i]);
|
||||
}
|
||||
};
|
||||
|
||||
SQL.TableManager.prototype.remove = function(e) {
|
||||
var titles = this.selection.slice(0);
|
||||
for (var i=0;i<titles.length;i++) { titles[i] = "'"+titles[i].getTitle()+"'"; }
|
||||
var result = confirm(_("confirmtable")+" "+titles.join(", ")+"?");
|
||||
if (!result) { return; }
|
||||
var sel = this.selection.slice(0);
|
||||
for (var i=0;i<sel.length;i++) { this.owner.removeTable(sel[i]); }
|
||||
}
|
||||
SQL.TableManager.prototype.edit = function (e) {
|
||||
this.owner.window.open(_("edittable"), this.dom.container, this.save);
|
||||
|
||||
SQL.TableManager.prototype.edit = function(e) {
|
||||
this.owner.window.open(_("edittable"), this.dom.container, this.save);
|
||||
var title = this.selection[0].getTitle();
|
||||
this.dom.name.value = title;
|
||||
try {
|
||||
/* throws in ie6 */
|
||||
this.dom.comment.value = this.selection[0].getComment();
|
||||
} catch (e) {}
|
||||
|
||||
var title = this.selection[0].getTitle();
|
||||
this.dom.name.value = title;
|
||||
try { /* throws in ie6 */
|
||||
this.dom.comment.value = this.selection[0].getComment();
|
||||
} catch(e) {}
|
||||
/* pre-select table name */
|
||||
this.dom.name.focus();
|
||||
if (OZ.ie) {
|
||||
try {
|
||||
/* throws in ie6 */
|
||||
this.dom.name.select();
|
||||
} catch (e) {}
|
||||
} else {
|
||||
this.dom.name.setSelectionRange(0, title.length);
|
||||
}
|
||||
};
|
||||
|
||||
/* pre-select table name */
|
||||
this.dom.name.focus();
|
||||
if (OZ.ie) {
|
||||
try { /* throws in ie6 */
|
||||
this.dom.name.select();
|
||||
} catch(e) {}
|
||||
} else {
|
||||
this.dom.name.setSelectionRange(0, title.length);
|
||||
}
|
||||
}
|
||||
SQL.TableManager.prototype.keys = function (e) {
|
||||
/* open keys dialog */
|
||||
this.owner.keyManager.open(this.selection[0]);
|
||||
};
|
||||
|
||||
SQL.TableManager.prototype.keys = function(e) { /* open keys dialog */
|
||||
this.owner.keyManager.open(this.selection[0]);
|
||||
}
|
||||
SQL.TableManager.prototype.save = function () {
|
||||
this.selection[0].setTitle(this.dom.name.value);
|
||||
this.selection[0].setComment(this.dom.comment.value);
|
||||
};
|
||||
|
||||
SQL.TableManager.prototype.save = function() {
|
||||
this.selection[0].setTitle(this.dom.name.value);
|
||||
this.selection[0].setComment(this.dom.comment.value);
|
||||
}
|
||||
SQL.TableManager.prototype.press = function (e) {
|
||||
var target = OZ.Event.target(e).nodeName.toLowerCase();
|
||||
if (target == "textarea" || target == "input") {
|
||||
return;
|
||||
} /* not when in form field */
|
||||
|
||||
SQL.TableManager.prototype.press = function(e) {
|
||||
var target = OZ.Event.target(e).nodeName.toLowerCase();
|
||||
if (target == "textarea" || target == "input") { return; } /* not when in form field */
|
||||
if (this.owner.rowManager.selected) {
|
||||
return;
|
||||
} /* do not process keypresses if a row is selected */
|
||||
|
||||
if (this.owner.rowManager.selected) { return; } /* do not process keypresses if a row is selected */
|
||||
if (!this.selection.length) {
|
||||
return;
|
||||
} /* nothing if selection is active */
|
||||
|
||||
if (!this.selection.length) { return; } /* nothing if selection is active */
|
||||
|
||||
switch (e.keyCode) {
|
||||
case 46:
|
||||
this.remove();
|
||||
OZ.Event.prevent(e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch (e.keyCode) {
|
||||
case 46:
|
||||
this.remove();
|
||||
OZ.Event.prevent(e);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,26 +1,28 @@
|
||||
/* ------------------ minimize/restore bar ----------- */
|
||||
|
||||
SQL.Toggle = function(elm) {
|
||||
this._state = null;
|
||||
this._elm = elm;
|
||||
OZ.Event.add(elm, "click", this._click.bind(this));
|
||||
SQL.Toggle = function (elm) {
|
||||
this._state = null;
|
||||
this._elm = elm;
|
||||
OZ.Event.add(elm, "click", this._click.bind(this));
|
||||
|
||||
var defaultState = true;
|
||||
if (document.location.href.match(/toolbar=hidden/)) { defaultState = false; }
|
||||
this._switch(defaultState);
|
||||
}
|
||||
var defaultState = true;
|
||||
if (document.location.href.match(/toolbar=hidden/)) {
|
||||
defaultState = false;
|
||||
}
|
||||
this._switch(defaultState);
|
||||
};
|
||||
|
||||
SQL.Toggle.prototype._click = function(e) {
|
||||
this._switch(!this._state);
|
||||
}
|
||||
SQL.Toggle.prototype._click = function (e) {
|
||||
this._switch(!this._state);
|
||||
};
|
||||
|
||||
SQL.Toggle.prototype._switch = function(state) {
|
||||
this._state = state;
|
||||
if (this._state) {
|
||||
OZ.$("bar").style.height = "";
|
||||
} else {
|
||||
OZ.$("bar").style.overflow = "hidden";
|
||||
OZ.$("bar").style.height = this._elm.offsetHeight + "px";
|
||||
}
|
||||
this._elm.className = (this._state ? "on" : "off");
|
||||
}
|
||||
SQL.Toggle.prototype._switch = function (state) {
|
||||
this._state = state;
|
||||
if (this._state) {
|
||||
OZ.$("bar").style.maxHeight = "";
|
||||
} else {
|
||||
OZ.$("bar").style.overflow = "hidden";
|
||||
OZ.$("bar").style.maxHeight = this._elm.offsetHeight + "px";
|
||||
}
|
||||
this._elm.className = this._state ? "on" : "off";
|
||||
};
|
||||
|
||||
@@ -1,40 +1,43 @@
|
||||
/* -------------------- base visual element -------------------- */
|
||||
SQL.Visual = function() {
|
||||
this._init();
|
||||
this._build();
|
||||
}
|
||||
SQL.Visual = function () {
|
||||
this._init();
|
||||
this._build();
|
||||
};
|
||||
|
||||
SQL.Visual.prototype._init = function() {
|
||||
this.dom = {
|
||||
container: null,
|
||||
title: null
|
||||
};
|
||||
this.data = {
|
||||
title:""
|
||||
}
|
||||
}
|
||||
SQL.Visual.prototype._init = function () {
|
||||
this.dom = {
|
||||
container: null,
|
||||
title: null,
|
||||
};
|
||||
this.data = {
|
||||
title: "",
|
||||
};
|
||||
};
|
||||
|
||||
SQL.Visual.prototype._build = function() {}
|
||||
SQL.Visual.prototype._build = function () {};
|
||||
|
||||
SQL.Visual.prototype.toXML = function() {}
|
||||
SQL.Visual.prototype.toXML = function () {};
|
||||
|
||||
SQL.Visual.prototype.fromXML = function(node) {}
|
||||
SQL.Visual.prototype.fromXML = function (node) {};
|
||||
|
||||
SQL.Visual.prototype.destroy = function() { /* "destructor" */
|
||||
var p = this.dom.container.parentNode;
|
||||
if (p && p.nodeType == 1) {
|
||||
p.removeChild(this.dom.container);
|
||||
}
|
||||
}
|
||||
SQL.Visual.prototype.destroy = function () {
|
||||
/* "destructor" */
|
||||
var p = this.dom.container.parentNode;
|
||||
if (p && p.nodeType == 1) {
|
||||
p.removeChild(this.dom.container);
|
||||
}
|
||||
};
|
||||
|
||||
SQL.Visual.prototype.setTitle = function(text) {
|
||||
if (!text) { return; }
|
||||
this.data.title = text;
|
||||
this.dom.title.innerHTML = text;
|
||||
}
|
||||
SQL.Visual.prototype.setTitle = function (text) {
|
||||
if (!text) {
|
||||
return;
|
||||
}
|
||||
this.data.title = text;
|
||||
this.dom.title.innerHTML = text;
|
||||
};
|
||||
|
||||
SQL.Visual.prototype.getTitle = function() {
|
||||
return this.data.title;
|
||||
}
|
||||
SQL.Visual.prototype.getTitle = function () {
|
||||
return this.data.title;
|
||||
};
|
||||
|
||||
SQL.Visual.prototype.redraw = function() {}
|
||||
SQL.Visual.prototype.redraw = function () {};
|
||||
|
||||
@@ -1,93 +1,110 @@
|
||||
/* --------------------- window ------------ */
|
||||
|
||||
SQL.Window = function(owner) {
|
||||
this.owner = owner;
|
||||
this.dom = {
|
||||
container:OZ.$("window"),
|
||||
background:OZ.$("background"),
|
||||
ok:OZ.$("windowok"),
|
||||
cancel:OZ.$("windowcancel"),
|
||||
title:OZ.$("windowtitle"),
|
||||
content:OZ.$("windowcontent"),
|
||||
throbber:OZ.$("throbber")
|
||||
}
|
||||
this.dom.ok.value = _("windowok");
|
||||
this.dom.cancel.value = _("windowcancel");
|
||||
this.dom.throbber.alt = this.dom.throbber.title = _("throbber");
|
||||
OZ.Event.add(this.dom.ok, "click", this.ok.bind(this));
|
||||
OZ.Event.add(this.dom.cancel, "click", this.close.bind(this));
|
||||
OZ.Event.add(window, "keydown", this.key.bind(this));
|
||||
SQL.Window = function (owner) {
|
||||
this.owner = owner;
|
||||
this.dom = {
|
||||
container: OZ.$("window"),
|
||||
background: OZ.$("background"),
|
||||
ok: OZ.$("windowok"),
|
||||
cancel: OZ.$("windowcancel"),
|
||||
title: OZ.$("windowtitle"),
|
||||
content: OZ.$("windowcontent"),
|
||||
throbber: OZ.$("throbber"),
|
||||
};
|
||||
this.dom.ok.value = _("windowok");
|
||||
this.dom.cancel.value = _("windowcancel");
|
||||
this.dom.throbber.alt = this.dom.throbber.title = _("throbber");
|
||||
OZ.Event.add(this.dom.ok, "click", this.ok.bind(this));
|
||||
OZ.Event.add(this.dom.cancel, "click", this.close.bind(this));
|
||||
OZ.Event.add(document, "keydown", this.key.bind(this));
|
||||
|
||||
this.sync = this.sync.bind(this);
|
||||
this.sync = this.sync.bind(this);
|
||||
|
||||
OZ.Event.add(window, "scroll", this.sync);
|
||||
OZ.Event.add(window, "resize", this.sync);
|
||||
this.state = 0;
|
||||
this.hideThrobber();
|
||||
OZ.Event.add(window, "scroll", this.sync);
|
||||
OZ.Event.add(window, "resize", this.sync);
|
||||
this.state = 0;
|
||||
this.hideThrobber();
|
||||
|
||||
this.sync();
|
||||
}
|
||||
this.sync();
|
||||
};
|
||||
|
||||
SQL.Window.prototype.showThrobber = function() {
|
||||
this.dom.throbber.style.visibility = "";
|
||||
}
|
||||
SQL.Window.prototype.showThrobber = function () {
|
||||
this.dom.throbber.style.visibility = "";
|
||||
};
|
||||
|
||||
SQL.Window.prototype.hideThrobber = function() {
|
||||
this.dom.throbber.style.visibility = "hidden";
|
||||
}
|
||||
SQL.Window.prototype.hideThrobber = function () {
|
||||
this.dom.throbber.style.visibility = "hidden";
|
||||
};
|
||||
|
||||
SQL.Window.prototype.open = function(title, content, callback) {
|
||||
this.state = 1;
|
||||
this.callback = callback;
|
||||
while (this.dom.title.childNodes.length > 1) { this.dom.title.removeChild(this.dom.title.childNodes[1]); }
|
||||
SQL.Window.prototype.open = function (title, content, callback) {
|
||||
this.state = 1;
|
||||
this.callback = callback;
|
||||
while (this.dom.title.childNodes.length > 1) {
|
||||
this.dom.title.removeChild(this.dom.title.childNodes[1]);
|
||||
}
|
||||
|
||||
var txt = OZ.DOM.text(title);
|
||||
this.dom.title.appendChild(txt);
|
||||
this.dom.background.style.visibility = "visible";
|
||||
OZ.DOM.clear(this.dom.content);
|
||||
this.dom.content.appendChild(content);
|
||||
var txt = OZ.DOM.text(title);
|
||||
this.dom.title.appendChild(txt);
|
||||
this.dom.background.style.visibility = "visible";
|
||||
OZ.DOM.clear(this.dom.content);
|
||||
this.dom.content.appendChild(content);
|
||||
|
||||
var win = OZ.DOM.win();
|
||||
var scroll = OZ.DOM.scroll();
|
||||
this.dom.container.style.left = Math.round(scroll[0] + (win[0] - this.dom.container.offsetWidth)/2)+"px";
|
||||
this.dom.container.style.top = Math.round(scroll[1] + (win[1] - this.dom.container.offsetHeight)/2)+"px";
|
||||
var win = OZ.DOM.win();
|
||||
var scroll = OZ.DOM.scroll();
|
||||
this.dom.container.style.left =
|
||||
Math.round(scroll[0] + (win[0] - this.dom.container.offsetWidth) / 2) +
|
||||
"px";
|
||||
this.dom.container.style.top =
|
||||
Math.round(scroll[1] + (win[1] - this.dom.container.offsetHeight) / 2) +
|
||||
"px";
|
||||
|
||||
this.dom.cancel.style.visibility = (this.callback ? "" : "hidden");
|
||||
this.dom.container.style.visibility = "visible";
|
||||
this.dom.cancel.style.visibility = this.callback ? "" : "hidden";
|
||||
this.dom.container.style.visibility = "visible";
|
||||
|
||||
var formElements = ["input","select","textarea"];
|
||||
var all = this.dom.container.getElementsByTagName("*");
|
||||
for (var i=0;i<all.length;i++) {
|
||||
if (formElements.indexOf(all[i].tagName.toLowerCase()) != -1) {
|
||||
all[i].focus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
var formElements = ["input", "select", "textarea"];
|
||||
var all = this.dom.container.getElementsByTagName("*");
|
||||
for (var i = 0; i < all.length; i++) {
|
||||
if (formElements.indexOf(all[i].tagName.toLowerCase()) != -1) {
|
||||
all[i].focus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
SQL.Window.prototype.key = function(e) {
|
||||
if (!this.state) { return; }
|
||||
if (e.keyCode == 13) { this.ok(e); }
|
||||
if (e.keyCode == 27) { this.close(); }
|
||||
}
|
||||
SQL.Window.prototype.key = function (e) {
|
||||
if (!this.state) {
|
||||
return;
|
||||
}
|
||||
if (e.keyCode == 13) {
|
||||
this.ok(e);
|
||||
}
|
||||
if (e.keyCode == 27) {
|
||||
this.close();
|
||||
}
|
||||
};
|
||||
|
||||
SQL.Window.prototype.ok = function(e) {
|
||||
if (this.callback) { this.callback(); }
|
||||
this.close();
|
||||
}
|
||||
SQL.Window.prototype.ok = function (e) {
|
||||
if (this.callback) {
|
||||
this.callback();
|
||||
}
|
||||
this.close();
|
||||
};
|
||||
|
||||
SQL.Window.prototype.close = function() {
|
||||
if (!this.state) { return; }
|
||||
this.state = 0;
|
||||
this.dom.background.style.visibility = "hidden";
|
||||
this.dom.container.style.visibility = "hidden";
|
||||
}
|
||||
SQL.Window.prototype.close = function () {
|
||||
if (!this.state) {
|
||||
return;
|
||||
}
|
||||
this.state = 0;
|
||||
this.dom.background.style.visibility = "hidden";
|
||||
this.dom.container.style.visibility = "hidden";
|
||||
};
|
||||
|
||||
SQL.Window.prototype.sync = function() { /* adjust background position */
|
||||
var dims = OZ.DOM.win();
|
||||
var scroll = OZ.DOM.scroll();
|
||||
this.dom.background.style.width = dims[0]+"px";
|
||||
this.dom.background.style.height = dims[1]+"px";
|
||||
this.dom.background.style.left = scroll[0]+"px";
|
||||
this.dom.background.style.top = scroll[1]+"px";
|
||||
}
|
||||
SQL.Window.prototype.sync = function () {
|
||||
/* adjust background position */
|
||||
var dims = OZ.DOM.win();
|
||||
var scroll = OZ.DOM.scroll();
|
||||
this.dom.background.style.width = dims[0] + "px";
|
||||
this.dom.background.style.height = dims[1] + "px";
|
||||
this.dom.background.style.left = scroll[0] + "px";
|
||||
this.dom.background.style.top = scroll[1] + "px";
|
||||
};
|
||||
|
||||
@@ -1,343 +1,444 @@
|
||||
SQL.Designer = function() {
|
||||
SQL.Designer = this;
|
||||
SQL.Designer = function () {
|
||||
SQL.Designer = this;
|
||||
|
||||
this.tables = [];
|
||||
this.relations = [];
|
||||
this.title = document.title;
|
||||
this.xhrheaders = {};
|
||||
this.tables = [];
|
||||
this.relations = [];
|
||||
this.title = document.title;
|
||||
|
||||
SQL.Visual.apply(this);
|
||||
new SQL.Toggle(OZ.$("toggle"));
|
||||
SQL.Visual.apply(this);
|
||||
new SQL.Toggle(OZ.$("toggle"));
|
||||
|
||||
this.dom.container = OZ.$("area");
|
||||
this.minSize = [
|
||||
this.dom.container.offsetWidth,
|
||||
this.dom.container.offsetHeight
|
||||
];
|
||||
this.width = this.minSize[0];
|
||||
this.height = this.minSize[1];
|
||||
this.dom.container = OZ.$("area");
|
||||
this.minSize = [
|
||||
this.dom.container.offsetWidth,
|
||||
this.dom.container.offsetHeight,
|
||||
];
|
||||
this.width = this.minSize[0];
|
||||
this.height = this.minSize[1];
|
||||
|
||||
this.typeIndex = false;
|
||||
this.fkTypeFor = false;
|
||||
this.typeIndex = false;
|
||||
this.fkTypeFor = false;
|
||||
|
||||
this.vector = this.getOption("vector") && document.createElementNS;
|
||||
if (this.vector) {
|
||||
this.svgNS = "http://www.w3.org/2000/svg";
|
||||
this.dom.svg = document.createElementNS(this.svgNS, "svg");
|
||||
this.dom.container.appendChild(this.dom.svg);
|
||||
}
|
||||
this.vector = this.getOption("vector") && document.createElementNS;
|
||||
if (this.vector) {
|
||||
this.svgNS = "http://www.w3.org/2000/svg";
|
||||
this.dom.svg = document.createElementNS(this.svgNS, "svg");
|
||||
this.dom.container.appendChild(this.dom.svg);
|
||||
}
|
||||
|
||||
this.flag = 2;
|
||||
this.requestLanguage();
|
||||
this.requestDB();
|
||||
}
|
||||
this.flag = 2;
|
||||
this.requestLanguage();
|
||||
this.requestDB();
|
||||
this.applyStyle();
|
||||
};
|
||||
SQL.Designer.prototype = Object.create(SQL.Visual.prototype);
|
||||
|
||||
/* update area size */
|
||||
SQL.Designer.prototype.sync = function() {
|
||||
var w = this.minSize[0];
|
||||
var h = this.minSize[0];
|
||||
for (var i=0;i<this.tables.length;i++) {
|
||||
var t = this.tables[i];
|
||||
w = Math.max(w, t.x + t.width);
|
||||
h = Math.max(h, t.y + t.height);
|
||||
}
|
||||
SQL.Designer.prototype.sync = function () {
|
||||
var w = this.minSize[0];
|
||||
var h = this.minSize[0];
|
||||
for (var i = 0; i < this.tables.length; i++) {
|
||||
var t = this.tables[i];
|
||||
w = Math.max(w, t.x + t.width);
|
||||
h = Math.max(h, t.y + t.height);
|
||||
}
|
||||
|
||||
this.width = w;
|
||||
this.height = h;
|
||||
this.map.sync();
|
||||
this.width = w;
|
||||
this.height = h;
|
||||
this.map.sync();
|
||||
|
||||
if (this.vector) {
|
||||
this.dom.svg.setAttribute("width", this.width);
|
||||
this.dom.svg.setAttribute("height", this.height);
|
||||
}
|
||||
}
|
||||
if (this.vector) {
|
||||
this.dom.svg.setAttribute("width", this.width);
|
||||
this.dom.svg.setAttribute("height", this.height);
|
||||
}
|
||||
};
|
||||
|
||||
SQL.Designer.prototype.requestLanguage = function() { /* get locale file */
|
||||
var lang = this.getOption("locale")
|
||||
var bp = this.getOption("staticpath");
|
||||
var url = bp + "locale/"+lang+".xml";
|
||||
OZ.Request(url, this.languageResponse.bind(this), {method:"get", xml:true});
|
||||
}
|
||||
SQL.Designer.prototype.requestLanguage = function () {
|
||||
/* get locale file */
|
||||
var lang = this.getOption("locale");
|
||||
var bp = this.getOption("staticpath");
|
||||
var url = bp + "locale/" + lang + ".xml";
|
||||
OZ.Request(url, this.languageResponse.bind(this), {
|
||||
method: "get",
|
||||
xml: true,
|
||||
});
|
||||
};
|
||||
|
||||
SQL.Designer.prototype.languageResponse = function(xmlDoc) {
|
||||
if (xmlDoc) {
|
||||
var strings = xmlDoc.getElementsByTagName("string");
|
||||
for (var i=0;i<strings.length;i++) {
|
||||
var n = strings[i].getAttribute("name");
|
||||
var v = strings[i].firstChild.nodeValue;
|
||||
window.LOCALE[n] = v;
|
||||
}
|
||||
}
|
||||
this.flag--;
|
||||
if (!this.flag) { this.init2(); }
|
||||
}
|
||||
SQL.Designer.prototype.languageResponse = function (xmlDoc) {
|
||||
if (xmlDoc) {
|
||||
var strings = xmlDoc.getElementsByTagName("string");
|
||||
for (var i = 0; i < strings.length; i++) {
|
||||
var n = strings[i].getAttribute("name");
|
||||
var v = strings[i].firstChild.nodeValue;
|
||||
window.LOCALE[n] = v;
|
||||
}
|
||||
}
|
||||
this.flag--;
|
||||
if (!this.flag) {
|
||||
this.init2();
|
||||
}
|
||||
};
|
||||
|
||||
SQL.Designer.prototype.requestDB = function() { /* get datatypes file */
|
||||
var db = this.getOption("db");
|
||||
var bp = this.getOption("staticpath");
|
||||
var url = bp + "db/"+db+"/datatypes.xml";
|
||||
OZ.Request(url, this.dbResponse.bind(this), {method:"get", xml:true});
|
||||
}
|
||||
SQL.Designer.prototype.requestDB = function () {
|
||||
/* get datatypes file */
|
||||
var db = this.getOption("db");
|
||||
var bp = this.getOption("staticpath");
|
||||
var url = bp + "db/" + db + "/datatypes.xml";
|
||||
OZ.Request(url, this.dbResponse.bind(this), { method: "get", xml: true });
|
||||
};
|
||||
|
||||
SQL.Designer.prototype.dbResponse = function(xmlDoc) {
|
||||
if (xmlDoc) {
|
||||
window.DATATYPES = xmlDoc.documentElement;
|
||||
}
|
||||
this.flag--;
|
||||
if (!this.flag) { this.init2(); }
|
||||
}
|
||||
SQL.Designer.prototype.dbResponse = function (xmlDoc) {
|
||||
if (xmlDoc) {
|
||||
window.DATATYPES = xmlDoc.documentElement;
|
||||
}
|
||||
this.flag--;
|
||||
if (!this.flag) {
|
||||
this.init2();
|
||||
}
|
||||
};
|
||||
|
||||
SQL.Designer.prototype.init2 = function() { /* secondary init, after locale & datatypes were retrieved */
|
||||
this.map = new SQL.Map(this);
|
||||
this.rubberband = new SQL.Rubberband(this);
|
||||
this.tableManager = new SQL.TableManager(this);
|
||||
this.rowManager = new SQL.RowManager(this);
|
||||
this.keyManager = new SQL.KeyManager(this);
|
||||
this.options = new SQL.Options(this);
|
||||
this.window = new SQL.Window(this);
|
||||
this.io = new SQL.IO(this);
|
||||
SQL.Designer.prototype.applyStyle = function () {
|
||||
/* apply style */
|
||||
var style = this.getOption("style");
|
||||
var i,
|
||||
link_elms = document.querySelectorAll("link");
|
||||
for (i = 0; i < link_elms.length; i++) {
|
||||
if (
|
||||
link_elms[i].getAttribute("rel").indexOf("style") != -1 &&
|
||||
link_elms[i].getAttribute("title")
|
||||
) {
|
||||
link_elms[i].disabled = true;
|
||||
if (link_elms[i].getAttribute("title") == style)
|
||||
link_elms[i].disabled = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this.sync();
|
||||
SQL.Designer.prototype.init2 = function () {
|
||||
/* secondary init, after locale & datatypes were retrieved */
|
||||
this.map = new SQL.Map(this);
|
||||
this.rubberband = new SQL.Rubberband(this);
|
||||
this.tableManager = new SQL.TableManager(this);
|
||||
this.rowManager = new SQL.RowManager(this);
|
||||
this.keyManager = new SQL.KeyManager(this);
|
||||
this.io = new SQL.IO(this);
|
||||
this.options = new SQL.Options(this);
|
||||
this.window = new SQL.Window(this);
|
||||
|
||||
OZ.$("docs").value = _("docs");
|
||||
this.sync();
|
||||
|
||||
document.body.style.visibility = "visible";
|
||||
}
|
||||
OZ.$("docs").value = _("docs");
|
||||
|
||||
SQL.Designer.prototype.getMaxZ = function() { /* find max zIndex */
|
||||
var max = 0;
|
||||
for (var i=0;i<this.tables.length;i++) {
|
||||
var z = this.tables[i].getZ();
|
||||
if (z > max) { max = z; }
|
||||
}
|
||||
var url = window.location.href;
|
||||
var r = url.match(/keyword=([^&]+)/);
|
||||
if (r) {
|
||||
var keyword = r[1];
|
||||
this.io.serverload(false, keyword);
|
||||
}
|
||||
document.body.style.visibility = "visible";
|
||||
};
|
||||
|
||||
OZ.$("controls").style.zIndex = max+5;
|
||||
return max;
|
||||
}
|
||||
SQL.Designer.prototype.getMaxZ = function () {
|
||||
/* find max zIndex */
|
||||
var max = 0;
|
||||
for (var i = 0; i < this.tables.length; i++) {
|
||||
var z = this.tables[i].getZ();
|
||||
if (z > max) {
|
||||
max = z;
|
||||
}
|
||||
}
|
||||
|
||||
SQL.Designer.prototype.addTable = function(name, x, y) {
|
||||
var max = this.getMaxZ();
|
||||
var t = new SQL.Table(this, name, x, y, max+1);
|
||||
this.tables.push(t);
|
||||
this.dom.container.appendChild(t.dom.container);
|
||||
return t;
|
||||
}
|
||||
OZ.$("controls").style.zIndex = max + 5;
|
||||
return max;
|
||||
};
|
||||
|
||||
SQL.Designer.prototype.removeTable = function(t) {
|
||||
this.tableManager.select(false);
|
||||
this.rowManager.select(false);
|
||||
var idx = this.tables.indexOf(t);
|
||||
if (idx == -1) { return; }
|
||||
t.destroy();
|
||||
this.tables.splice(idx,1);
|
||||
}
|
||||
SQL.Designer.prototype.addTable = function (name, x, y) {
|
||||
var max = this.getMaxZ();
|
||||
var t = new SQL.Table(this, name, x, y, max + 1);
|
||||
this.tables.push(t);
|
||||
this.dom.container.appendChild(t.dom.container);
|
||||
return t;
|
||||
};
|
||||
|
||||
SQL.Designer.prototype.addRelation = function(row1, row2) {
|
||||
var r = new SQL.Relation(this, row1, row2);
|
||||
this.relations.push(r);
|
||||
return r;
|
||||
}
|
||||
SQL.Designer.prototype.removeTable = function (t) {
|
||||
this.tableManager.select(false);
|
||||
this.rowManager.select(false);
|
||||
var idx = this.tables.indexOf(t);
|
||||
if (idx == -1) {
|
||||
return;
|
||||
}
|
||||
t.destroy();
|
||||
this.tables.splice(idx, 1);
|
||||
};
|
||||
|
||||
SQL.Designer.prototype.removeRelation = function(r) {
|
||||
var idx = this.relations.indexOf(r);
|
||||
if (idx == -1) { return; }
|
||||
r.destroy();
|
||||
this.relations.splice(idx,1);
|
||||
}
|
||||
SQL.Designer.prototype.addRelation = function (row1, row2) {
|
||||
var r = new SQL.Relation(this, row1, row2);
|
||||
this.relations.push(r);
|
||||
return r;
|
||||
};
|
||||
|
||||
SQL.Designer.prototype.getCookie = function() {
|
||||
var c = document.cookie;
|
||||
var obj = {};
|
||||
var parts = c.split(";");
|
||||
for (var i=0;i<parts.length;i++) {
|
||||
var part = parts[i];
|
||||
var r = part.match(/wwwsqldesigner=({.*?})/);
|
||||
if (r) { obj = eval("("+r[1]+")"); }
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
SQL.Designer.prototype.removeRelation = function (r) {
|
||||
var idx = this.relations.indexOf(r);
|
||||
if (idx == -1) {
|
||||
return;
|
||||
}
|
||||
r.destroy();
|
||||
this.relations.splice(idx, 1);
|
||||
};
|
||||
|
||||
SQL.Designer.prototype.setCookie = function(obj) {
|
||||
var arr = [];
|
||||
for (var p in obj) {
|
||||
arr.push(p+":'"+obj[p]+"'");
|
||||
}
|
||||
var str = "{"+arr.join(",")+"}";
|
||||
document.cookie = "wwwsqldesigner="+str+"; path=/";
|
||||
}
|
||||
SQL.Designer.prototype.getCookie = function () {
|
||||
var c = document.cookie;
|
||||
var obj = {};
|
||||
var parts = c.split(";");
|
||||
for (var i = 0; i < parts.length; i++) {
|
||||
var part = parts[i];
|
||||
var r = part.match(/wwwsqldesigner=({.*?})/);
|
||||
if (r) {
|
||||
obj = eval("(" + r[1] + ")");
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
|
||||
SQL.Designer.prototype.getOption = function(name) {
|
||||
var c = this.getCookie();
|
||||
if (name in c) { return c[name]; }
|
||||
/* defaults */
|
||||
switch (name) {
|
||||
case "locale": return CONFIG.DEFAULT_LOCALE;
|
||||
case "db": return CONFIG.DEFAULT_DB;
|
||||
case "staticpath": return CONFIG.STATIC_PATH || "";
|
||||
case "xhrpath": return CONFIG.XHR_PATH || "";
|
||||
case "snap": return 0;
|
||||
case "showsize": return 0;
|
||||
case "showtype": return 0;
|
||||
case "pattern": return "%R_%T";
|
||||
case "hide": return false;
|
||||
case "vector": return true;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
SQL.Designer.prototype.setCookie = function (obj) {
|
||||
var arr = [];
|
||||
for (var p in obj) {
|
||||
arr.push(p + ":'" + obj[p] + "'");
|
||||
}
|
||||
var str = "{" + arr.join(",") + "}";
|
||||
document.cookie = "wwwsqldesigner=" + str + "; path=/";
|
||||
};
|
||||
|
||||
SQL.Designer.prototype.setOption = function(name, value) {
|
||||
var obj = this.getCookie();
|
||||
obj[name] = value;
|
||||
this.setCookie(obj);
|
||||
}
|
||||
SQL.Designer.prototype.getOption = function (name) {
|
||||
var c = this.getCookie();
|
||||
if (name in c) {
|
||||
return c[name];
|
||||
}
|
||||
/* defaults */
|
||||
switch (name) {
|
||||
case "locale":
|
||||
return CONFIG.DEFAULT_LOCALE;
|
||||
case "db":
|
||||
return CONFIG.DEFAULT_DB;
|
||||
case "staticpath":
|
||||
return CONFIG.STATIC_PATH || "";
|
||||
case "xhrpath":
|
||||
return CONFIG.XHR_PATH || "";
|
||||
case "snap":
|
||||
return 0;
|
||||
case "showsize":
|
||||
return 0;
|
||||
case "showtype":
|
||||
return 0;
|
||||
case "pattern":
|
||||
return "%R_%T";
|
||||
case "hide":
|
||||
return false;
|
||||
case "vector":
|
||||
return true;
|
||||
case "style":
|
||||
return "material-inspired";
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
SQL.Designer.prototype.raise = function(table) { /* raise a table */
|
||||
var old = table.getZ();
|
||||
var max = this.getMaxZ();
|
||||
table.setZ(max);
|
||||
for (var i=0;i<this.tables.length;i++) {
|
||||
var t = this.tables[i];
|
||||
if (t == table) { continue; }
|
||||
if (t.getZ() > old) { t.setZ(t.getZ()-1); }
|
||||
}
|
||||
var m = table.dom.mini;
|
||||
m.parentNode.appendChild(m);
|
||||
}
|
||||
SQL.Designer.prototype.setOption = function (name, value) {
|
||||
var obj = this.getCookie();
|
||||
obj[name] = value;
|
||||
this.setCookie(obj);
|
||||
};
|
||||
|
||||
SQL.Designer.prototype.clearTables = function() {
|
||||
while (this.tables.length) { this.removeTable(this.tables[0]); }
|
||||
this.setTitle(false);
|
||||
}
|
||||
SQL.Designer.prototype.getXhrHeaders = function (value) {
|
||||
return this.xhrheaders;
|
||||
};
|
||||
|
||||
SQL.Designer.prototype.alignTables = function() {
|
||||
var win = OZ.DOM.win();
|
||||
var avail = win[0] - OZ.$("bar").offsetWidth;
|
||||
var x = 10;
|
||||
var y = 10;
|
||||
var max = 0;
|
||||
SQL.Designer.prototype.setXhrHeaders = function (value) {
|
||||
this.xhrheaders = value;
|
||||
};
|
||||
|
||||
this.tables.sort(function(a,b){
|
||||
return b.getRelations().length - a.getRelations().length;
|
||||
});
|
||||
SQL.Designer.prototype.raise = function (table) {
|
||||
/* raise a table */
|
||||
var old = table.getZ();
|
||||
var max = this.getMaxZ();
|
||||
table.setZ(max);
|
||||
for (var i = 0; i < this.tables.length; i++) {
|
||||
var t = this.tables[i];
|
||||
if (t == table) {
|
||||
continue;
|
||||
}
|
||||
if (t.getZ() > old) {
|
||||
t.setZ(t.getZ() - 1);
|
||||
}
|
||||
}
|
||||
var m = table.dom.mini;
|
||||
m.parentNode.appendChild(m);
|
||||
};
|
||||
|
||||
for (var i=0;i<this.tables.length;i++) {
|
||||
var t = this.tables[i];
|
||||
var w = t.dom.container.offsetWidth;
|
||||
var h = t.dom.container.offsetHeight;
|
||||
if (x + w > avail) {
|
||||
x = 10;
|
||||
y += 10 + max;
|
||||
max = 0;
|
||||
}
|
||||
t.moveTo(x,y);
|
||||
x += 10 + w;
|
||||
if (h > max) { max = h; }
|
||||
}
|
||||
SQL.Designer.prototype.clearTables = function () {
|
||||
while (this.tables.length) {
|
||||
this.removeTable(this.tables[0]);
|
||||
}
|
||||
this.setTitle(false);
|
||||
};
|
||||
|
||||
this.sync();
|
||||
}
|
||||
SQL.Designer.prototype.alignTables = function () {
|
||||
var win = OZ.DOM.win();
|
||||
var avail = win[0] - OZ.$("bar").offsetWidth;
|
||||
var x = 10;
|
||||
var y = 10;
|
||||
var max = 0;
|
||||
|
||||
SQL.Designer.prototype.findNamedTable = function(name) { /* find row specified as table(row) */
|
||||
for (var i=0;i<this.tables.length;i++) {
|
||||
if (this.tables[i].getTitle() == name) { return this.tables[i]; }
|
||||
}
|
||||
}
|
||||
this.tables.sort(function (a, b) {
|
||||
return b.getRelations().length - a.getRelations().length;
|
||||
});
|
||||
|
||||
SQL.Designer.prototype.toXML = function() {
|
||||
var xml = '<?xml version="1.0" encoding="utf-8" ?>\n';
|
||||
xml += '<!-- SQL XML created by WWW SQL Designer, https://github.com/ondras/wwwsqldesigner/ -->\n';
|
||||
xml += '<!-- Active URL: ' + location.href + ' -->\n';
|
||||
xml += '<sql>\n';
|
||||
for (var i = 0; i < this.tables.length; i++) {
|
||||
var t = this.tables[i];
|
||||
var w = t.dom.container.offsetWidth;
|
||||
var h = t.dom.container.offsetHeight;
|
||||
if (x + w > avail) {
|
||||
x = 10;
|
||||
y += 10 + max;
|
||||
max = 0;
|
||||
}
|
||||
t.moveTo(x, y);
|
||||
x += 10 + w;
|
||||
if (h > max) {
|
||||
max = h;
|
||||
}
|
||||
}
|
||||
|
||||
/* serialize datatypes */
|
||||
if (window.XMLSerializer) {
|
||||
var s = new XMLSerializer();
|
||||
xml += s.serializeToString(window.DATATYPES);
|
||||
} else if (window.DATATYPES.xml) {
|
||||
xml += window.DATATYPES.xml;
|
||||
} else {
|
||||
alert(_("errorxml")+': '+e.message);
|
||||
}
|
||||
this.sync();
|
||||
};
|
||||
|
||||
for (var i=0;i<this.tables.length;i++) {
|
||||
xml += this.tables[i].toXML();
|
||||
}
|
||||
xml += "</sql>\n";
|
||||
return xml;
|
||||
}
|
||||
SQL.Designer.prototype.findNamedTable = function (name) {
|
||||
/* find row specified as table(row) */
|
||||
for (var i = 0; i < this.tables.length; i++) {
|
||||
if (this.tables[i].getTitle() == name) {
|
||||
return this.tables[i];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
SQL.Designer.prototype.fromXML = function(node) {
|
||||
this.clearTables();
|
||||
var types = node.getElementsByTagName("datatypes");
|
||||
if (types.length) { window.DATATYPES = types[0]; }
|
||||
var tables = node.getElementsByTagName("table");
|
||||
for (var i=0;i<tables.length;i++) {
|
||||
var t = this.addTable("", 0, 0);
|
||||
t.fromXML(tables[i]);
|
||||
}
|
||||
SQL.Designer.prototype.toXML = function () {
|
||||
var xml = '<?xml version="1.0" encoding="utf-8" ?>\n';
|
||||
xml +=
|
||||
"<!-- SQL XML created by WWW SQL Designer, https://github.com/ondras/wwwsqldesigner/ -->\n";
|
||||
xml += "<!-- Active URL: " + location.href + " -->\n";
|
||||
xml += "<sql>\n";
|
||||
|
||||
for (var i=0;i<this.tables.length;i++) { /* ff one-pixel shift hack */
|
||||
this.tables[i].select();
|
||||
this.tables[i].deselect();
|
||||
}
|
||||
/* serialize datatypes */
|
||||
if (window.XMLSerializer) {
|
||||
var s = new XMLSerializer();
|
||||
xml += s.serializeToString(window.DATATYPES);
|
||||
} else if (window.DATATYPES.xml) {
|
||||
xml += window.DATATYPES.xml;
|
||||
} else {
|
||||
alert(_("errorxml") + ": " + e.message);
|
||||
}
|
||||
|
||||
/* relations */
|
||||
var rs = node.getElementsByTagName("relation");
|
||||
for (var i=0;i<rs.length;i++) {
|
||||
var rel = rs[i];
|
||||
var tname = rel.getAttribute("table");
|
||||
var rname = rel.getAttribute("row");
|
||||
for (var i = 0; i < this.tables.length; i++) {
|
||||
xml += this.tables[i].toXML();
|
||||
}
|
||||
xml += "</sql>\n";
|
||||
return xml;
|
||||
};
|
||||
|
||||
var t1 = this.findNamedTable(tname);
|
||||
if (!t1) { continue; }
|
||||
var r1 = t1.findNamedRow(rname);
|
||||
if (!r1) { continue; }
|
||||
SQL.Designer.prototype.fromXML = function (node) {
|
||||
this.clearTables();
|
||||
var types = node.getElementsByTagName("datatypes");
|
||||
if (types.length) {
|
||||
window.DATATYPES = types[0];
|
||||
}
|
||||
var tables = node.getElementsByTagName("table");
|
||||
for (var i = 0; i < tables.length; i++) {
|
||||
var t = this.addTable("", 0, 0);
|
||||
t.fromXML(tables[i]);
|
||||
}
|
||||
|
||||
tname = rel.parentNode.parentNode.getAttribute("name");
|
||||
rname = rel.parentNode.getAttribute("name");
|
||||
var t2 = this.findNamedTable(tname);
|
||||
if (!t2) { continue; }
|
||||
var r2 = t2.findNamedRow(rname);
|
||||
if (!r2) { continue; }
|
||||
for (var i = 0; i < this.tables.length; i++) {
|
||||
/* ff one-pixel shift hack */
|
||||
this.tables[i].select();
|
||||
this.tables[i].deselect();
|
||||
}
|
||||
|
||||
this.addRelation(r1, r2);
|
||||
}
|
||||
/* relations */
|
||||
var rs = node.getElementsByTagName("relation");
|
||||
for (var i = 0; i < rs.length; i++) {
|
||||
var rel = rs[i];
|
||||
var tname = rel.getAttribute("table");
|
||||
var rname = rel.getAttribute("row");
|
||||
|
||||
this.sync();
|
||||
}
|
||||
var t1 = this.findNamedTable(tname);
|
||||
if (!t1) {
|
||||
continue;
|
||||
}
|
||||
var r1 = t1.findNamedRow(rname);
|
||||
if (!r1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
SQL.Designer.prototype.setTitle = function(t) {
|
||||
document.title = this.title + (t ? " - "+t : "");
|
||||
}
|
||||
tname = rel.parentNode.parentNode.getAttribute("name");
|
||||
rname = rel.parentNode.getAttribute("name");
|
||||
var t2 = this.findNamedTable(tname);
|
||||
if (!t2) {
|
||||
continue;
|
||||
}
|
||||
var r2 = t2.findNamedRow(rname);
|
||||
if (!r2) {
|
||||
continue;
|
||||
}
|
||||
|
||||
SQL.Designer.prototype.removeSelection = function() {
|
||||
var sel = (window.getSelection ? window.getSelection() : document.selection);
|
||||
if (!sel) { return; }
|
||||
if (sel.empty) { sel.empty(); }
|
||||
if (sel.removeAllRanges) { sel.removeAllRanges(); }
|
||||
}
|
||||
this.addRelation(r1, r2);
|
||||
}
|
||||
|
||||
SQL.Designer.prototype.getTypeIndex = function(label) {
|
||||
if (!this.typeIndex) {
|
||||
this.typeIndex = {};
|
||||
var types = window.DATATYPES.getElementsByTagName("type");
|
||||
for (var i=0;i<types.length;i++) {
|
||||
var l = types[i].getAttribute("label");
|
||||
if (l) { this.typeIndex[l] = i; }
|
||||
}
|
||||
}
|
||||
return this.typeIndex[label];
|
||||
}
|
||||
this.sync();
|
||||
};
|
||||
|
||||
SQL.Designer.prototype.getFKTypeFor = function(typeIndex) {
|
||||
if (!this.fkTypeFor) {
|
||||
this.fkTypeFor = {};
|
||||
var types = window.DATATYPES.getElementsByTagName("type");
|
||||
for (var i=0;i<types.length;i++) {
|
||||
this.fkTypeFor[i] = i;
|
||||
var fk = types[i].getAttribute("fk");
|
||||
if (fk) { this.fkTypeFor[i] = this.getTypeIndex(fk); }
|
||||
}
|
||||
}
|
||||
return this.fkTypeFor[typeIndex];
|
||||
}
|
||||
SQL.Designer.prototype.setTitle = function (t) {
|
||||
document.title = this.title + (t ? " - " + t : "");
|
||||
};
|
||||
|
||||
SQL.Designer.prototype.removeSelection = function () {
|
||||
var sel = window.getSelection ? window.getSelection() : document.selection;
|
||||
if (!sel) {
|
||||
return;
|
||||
}
|
||||
if (sel.empty) {
|
||||
sel.empty();
|
||||
}
|
||||
if (sel.removeAllRanges) {
|
||||
sel.removeAllRanges();
|
||||
}
|
||||
};
|
||||
|
||||
SQL.Designer.prototype.getTypeIndex = function (label) {
|
||||
if (!this.typeIndex) {
|
||||
this.typeIndex = {};
|
||||
var types = window.DATATYPES.getElementsByTagName("type");
|
||||
for (var i = 0; i < types.length; i++) {
|
||||
var l = types[i].getAttribute("label");
|
||||
if (l) {
|
||||
this.typeIndex[l] = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.typeIndex[label];
|
||||
};
|
||||
|
||||
SQL.Designer.prototype.getFKTypeFor = function (typeIndex) {
|
||||
if (!this.fkTypeFor) {
|
||||
this.fkTypeFor = {};
|
||||
var types = window.DATATYPES.getElementsByTagName("type");
|
||||
for (var i = 0; i < types.length; i++) {
|
||||
this.fkTypeFor[i] = i;
|
||||
var fk = types[i].getAttribute("fk");
|
||||
if (fk) {
|
||||
this.fkTypeFor[i] = this.getTypeIndex(fk);
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.fkTypeFor[typeIndex];
|
||||
};
|
||||
|
||||
@@ -1,93 +1,97 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- table management -->
|
||||
<string name="addtable">إنشاء جدول</string>
|
||||
<string name="edittable">تحرير جدول</string>
|
||||
<string name="removetable">حذف جدول</string>
|
||||
<string name="aligntables">محاذاة الجداول</string>
|
||||
<string name="cleartables">حذف جميع البيانات</string>
|
||||
<string name="confirmall">هل أنت متأكد من أنك تريد حذف جميع البيانات</string>
|
||||
<string name="newtable">new table</string>
|
||||
<string name="addpending">اختر المنطقة المحددة</string>
|
||||
<string name="tablenamelabel">اسم الجول</string>
|
||||
<string name="tablecommentlabel">وصف الجدول</string>
|
||||
<!-- table management -->
|
||||
<string name="addtable">إنشاء جدول</string>
|
||||
<string name="edittable">تحرير جدول</string>
|
||||
<string name="removetable">حذف جدول</string>
|
||||
<string name="aligntables">محاذاة الجداول</string>
|
||||
<string name="cleartables">حذف جميع البيانات</string>
|
||||
<string name="confirmall">هل أنت متأكد من أنك تريد حذف جميع البيانات</string>
|
||||
<string name="newtable">new table</string>
|
||||
<string name="addpending">اختر المنطقة المحددة</string>
|
||||
<string name="tablenamelabel">اسم الجول</string>
|
||||
<string name="tablecommentlabel">وصف الجدول</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">إنشاء حقل</string>
|
||||
<string name="editrow">تحرير حقل</string>
|
||||
<string name="removerow">حذف حقل</string>
|
||||
<string name="uprow">أعلى</string>
|
||||
<string name="downrow">أسفل</string>
|
||||
<string name="newrow">new field</string>
|
||||
<string name="foreigncreate">إنشاء مفتاح خارجي</string>
|
||||
<string name="foreignpending">اختر الجدول المطلوب</string>
|
||||
<string name="foreignconnect">ربط حقل بمفتاح خارجي</string>
|
||||
<string name="foreignconnectpending">اختر الحقل المطلوب</string>
|
||||
<string name="foreigndisconnect">حذف مفتاح خارجي</string>
|
||||
<string name="confirmtable">هل أنت متأكد من أنك تريد حذف الجدول</string>
|
||||
<string name="confirmrow">هل أنت متأكد من أنك تريد حذف الحقل</string>
|
||||
<!-- row management -->
|
||||
<string name="addrow">إنشاء حقل</string>
|
||||
<string name="editrow">تحرير حقل</string>
|
||||
<string name="removerow">حذف حقل</string>
|
||||
<string name="uprow">أعلى</string>
|
||||
<string name="downrow">أسفل</string>
|
||||
<string name="newrow">new field</string>
|
||||
<string name="foreigncreate">إنشاء مفتاح خارجي</string>
|
||||
<string name="foreignpending">اختر الجدول المطلوب</string>
|
||||
<string name="foreignconnect">ربط حقل بمفتاح خارجي</string>
|
||||
<string name="foreignconnectpending">اختر الحقل المطلوب</string>
|
||||
<string name="foreigndisconnect">حذف مفتاح خارجي</string>
|
||||
<string name="confirmtable">هل أنت متأكد من أنك تريد حذف الجدول</string>
|
||||
<string name="confirmrow">هل أنت متأكد من أنك تريد حذف الحقل</string>
|
||||
|
||||
<!-- row edit -->
|
||||
<string name="name">الإسم</string>
|
||||
<string name="type">النوع</string>
|
||||
<string name="size">الحجم</string>
|
||||
<string name="def">الإفتراضي</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">ترقيم تلقائي</string>
|
||||
<string name="comment">تحرير تعليق</string>
|
||||
<string name="commenttext">اكتب تعليقاً لهذا الحقل</string>
|
||||
<!-- row edit -->
|
||||
<string name="name">الإسم</string>
|
||||
<string name="type">النوع</string>
|
||||
<string name="size">الحجم</string>
|
||||
<string name="def">الإفتراضي</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">ترقيم تلقائي</string>
|
||||
<string name="comment">تحرير تعليق</string>
|
||||
<string name="commenttext">اكتب تعليقاً لهذا الحقل</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">موافق</string>
|
||||
<string name="windowcancel">إلغاء</string>
|
||||
<string name="throbber">يرجى الإنتظار ...</string>
|
||||
<string name="options">الخيارات</string>
|
||||
<string name="language">لغة العرض</string>
|
||||
<string name="db">قاعدة البيانات المستخدمة لحفظ التصاميم</string>
|
||||
<string name="optionsnotice">بعض الخيارات يتم تفعيلها بعد تحديث الصفحة مع ملاحظة أنه يجب تفعيل (الكوكيز) لتعمل هذه الخيارات</string>
|
||||
<string name="snap">Table snap distance</string>
|
||||
<string name="optionsnapnotice">In pixels, 0 = disable snapping</string>
|
||||
<string name="pattern">طريقة تنسيق أسماء المفاتيح الخارجية</string>
|
||||
<string name="optionpatternnotice">%T = الجدول الرئيسي, %R = المفتاح الرئيسي, %t = الجدول الخارجي</string>
|
||||
<string name="hide">إخفاء الخطوط عند تحريك الجدول؟</string>
|
||||
<string name="vector">رسم خطوط ناعمة (إذا كان المتصفح يدعم ذلك) ؟</string>
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">موافق</string>
|
||||
<string name="windowcancel">إلغاء</string>
|
||||
<string name="throbber">يرجى الإنتظار ...</string>
|
||||
<string name="options">الخيارات</string>
|
||||
<string name="language">لغة العرض</string>
|
||||
<string name="db">قاعدة البيانات المستخدمة لحفظ التصاميم</string>
|
||||
<string name="optionsnotice">بعض الخيارات يتم تفعيلها بعد تحديث الصفحة مع ملاحظة أنه يجب تفعيل (الكوكيز) لتعمل هذه الخيارات</string>
|
||||
<string name="snap">Table snap distance</string>
|
||||
<string name="optionsnapnotice">In pixels, 0 = disable snapping</string>
|
||||
<string name="pattern">طريقة تنسيق أسماء المفاتيح الخارجية</string>
|
||||
<string name="optionpatternnotice">%T = الجدول الرئيسي, %R = المفتاح الرئيسي, %t = الجدول الخارجي</string>
|
||||
<string name="hide">إخفاء الخطوط عند تحريك الجدول؟</string>
|
||||
<string name="vector">رسم خطوط ناعمة (إذا كان المتصفح يدعم ذلك) ؟</string>
|
||||
<string name="style">قلم المدقة</string>
|
||||
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">المفاتيح</string>
|
||||
<string name="keyslistlabel">المفاتيح في الجدول "%s"</string>
|
||||
<string name="keytypelabel">الأنواع:</string>
|
||||
<string name="keynamelabel">الإسم:</string>
|
||||
<string name="keyfieldslabel">مفاتيح الجدول</string>
|
||||
<string name="keyavaillabel">الحقول المتاحة</string>
|
||||
<string name="keyedit">تحرير مفتاح</string>
|
||||
<string name="keyadd">إنشاء مفتاح</string>
|
||||
<string name="keyremove">حذف مفتاح</string>
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">المفاتيح</string>
|
||||
<string name="keyslistlabel">المفاتيح في الجدول "%s"</string>
|
||||
<string name="keytypelabel">الأنواع:</string>
|
||||
<string name="keynamelabel">الإسم:</string>
|
||||
<string name="keyfieldslabel">مفاتيح الجدول</string>
|
||||
<string name="keyavaillabel">الحقول المتاحة</string>
|
||||
<string name="keyedit">تحرير مفتاح</string>
|
||||
<string name="keyadd">إنشاء مفتاح</string>
|
||||
<string name="keyremove">حذف مفتاح</string>
|
||||
|
||||
<!-- io -->
|
||||
<string name="saveload">حفظ / تحميل</string>
|
||||
<string name="empty">قم بوضع بيانات نموذج XML في المربع أدناه، ثم حاول مرّة أخرى.</string>
|
||||
<string name="clientsave">حفظ كنموذح XML</string>
|
||||
<string name="clientload">إستيراد نموذج XML</string>
|
||||
<string name="clientsql">حفظ كنموذج SQL</string>
|
||||
<string name="backendlabel">Server backend:</string>
|
||||
<string name="serversave">حفظ</string>
|
||||
<string name="serverload">تحميل</string>
|
||||
<string name="serverlist">List items</string>
|
||||
<string name="serverimport">إستيراد من قاعدة بيانات</string>
|
||||
<string name="serverloadprompt">Enter keyword under which your design was saved:</string>
|
||||
<string name="serversaveprompt">Enter keyword under which your design will be saved:</string>
|
||||
<string name="serverimportprompt">أدخل إسم قاعدة البيانات التي تريد إستيرادها:</string>
|
||||
<string name="httpresponse">رد الخادم</string>
|
||||
<string name="http201">تم الحفظ بنجاح</string>
|
||||
<string name="http404">لم يتم العثور عليه</string>
|
||||
<string name="http500">خطأ داخلي في الخادم</string>
|
||||
<string name="http501">الخاصية غير موجودة</string>
|
||||
<string name="http503">الخدمة غير متوفرة</string>
|
||||
<!-- io -->
|
||||
<string name="saveload">حفظ / تحميل</string>
|
||||
<string name="empty">قم بوضع بيانات نموذج XML في المربع أدناه، ثم حاول مرّة أخرى.</string>
|
||||
<string name="client">العميل</string>
|
||||
<string name="server">الخادم</string>
|
||||
<string name="output">المدخلات / المخرجات</string>
|
||||
<string name="clientsave">حفظ كنموذح XML</string>
|
||||
<string name="clientload">إستيراد نموذج XML</string>
|
||||
<string name="clientsql">حفظ كنموذج SQL</string>
|
||||
<string name="backendlabel">Server backend:</string>
|
||||
<string name="serversave">حفظ</string>
|
||||
<string name="serverload">تحميل</string>
|
||||
<string name="serverlist">List items</string>
|
||||
<string name="serverimport">إستيراد من قاعدة بيانات</string>
|
||||
<string name="serverloadprompt">Enter keyword under which your design was saved:</string>
|
||||
<string name="serversaveprompt">Enter keyword under which your design will be saved:</string>
|
||||
<string name="serverimportprompt">أدخل إسم قاعدة البيانات التي تريد إستيرادها:</string>
|
||||
<string name="httpresponse">رد الخادم</string>
|
||||
<string name="http201">تم الحفظ بنجاح</string>
|
||||
<string name="http404">لم يتم العثور عليه</string>
|
||||
<string name="http500">خطأ داخلي في الخادم</string>
|
||||
<string name="http501">الخاصية غير موجودة</string>
|
||||
<string name="http503">الخدمة غير متوفرة</string>
|
||||
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">خطأ في نموذح XML</string>
|
||||
<string name="docs">التوثيق</string>
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">خطأ في نموذح XML</string>
|
||||
<string name="docs">التوثيق</string>
|
||||
|
||||
</locale>
|
||||
|
||||
@@ -1,103 +1,102 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Přidat tabulku</string>
|
||||
<string name="edittable">Upravit tabulku</string>
|
||||
<string name="removetable">Smazat tabulku</string>
|
||||
<string name="removetables">Smazat tabulky</string>
|
||||
<string name="aligntables">Srovnat tabulky</string>
|
||||
<string name="cleartables">Zrušit tabulky</string>
|
||||
<string name="confirmall">Opravdu zrušit všechny tabulky</string>
|
||||
<string name="newtable">nová tabulka</string>
|
||||
<string name="addpending">umístit tabulku</string>
|
||||
<string name="tablenamelabel">Jméno</string>
|
||||
<string name="tablecommentlabel">Komentář</string>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Přidat tabulku</string>
|
||||
<string name="edittable">Upravit tabulku</string>
|
||||
<string name="removetable">Smazat tabulku</string>
|
||||
<string name="removetables">Smazat tabulky</string>
|
||||
<string name="aligntables">Srovnat tabulky</string>
|
||||
<string name="cleartables">Zrušit tabulky</string>
|
||||
<string name="confirmall">Opravdu zrušit všechny tabulky</string>
|
||||
<string name="newtable">nová tabulka</string>
|
||||
<string name="addpending">umístit tabulku</string>
|
||||
<string name="tablenamelabel">Jméno</string>
|
||||
<string name="tablecommentlabel">Komentář</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">Přidat položku</string>
|
||||
<string name="editrow">Upravit položku</string>
|
||||
<string name="removerow">Smazat položku</string>
|
||||
<string name="uprow">Nahoru</string>
|
||||
<string name="downrow">Dolů</string>
|
||||
<string name="newrow">nová položka</string>
|
||||
<string name="foreigncreate">Vyrobit cizí klíč</string>
|
||||
<string name="foreignpending">klikni na cílovou tabulku</string>
|
||||
<!-- row management -->
|
||||
<string name="addrow">Přidat položku</string>
|
||||
<string name="editrow">Upravit položku</string>
|
||||
<string name="removerow">Smazat položku</string>
|
||||
<string name="uprow">Nahoru</string>
|
||||
<string name="downrow">Dolů</string>
|
||||
<string name="newrow">nová položka</string>
|
||||
<string name="foreigncreate">Vyrobit cizí klíč</string>
|
||||
<string name="foreignpending">klikni na cílovou tabulku</string>
|
||||
<string name="foreignconnect">Propojit cizí klíč</string>
|
||||
<string name="foreignconnectpending">klikni na cílové pole</string>
|
||||
<string name="foreignconnectpending">klikni na cílové pole</string>
|
||||
<string name="foreigndisconnect">Smazat cizí klíč</string>
|
||||
<string name="confirmtable">Opravdu smazat tabulku</string>
|
||||
<string name="confirmrow">Opravdu smazat položku</string>
|
||||
<string name="confirmtable">Opravdu smazat tabulku</string>
|
||||
<string name="confirmrow">Opravdu smazat položku</string>
|
||||
|
||||
<!-- row edit -->
|
||||
<string name="name">Jméno</string>
|
||||
<string name="type">Typ</string>
|
||||
<string name="size">Velikost</string>
|
||||
<string name="def">Výchozí</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Autoincrement</string>
|
||||
<string name="comment">Upravit komentář</string>
|
||||
<string name="commenttext">VLožte komentář pro tuto položku</string>
|
||||
<!-- row edit -->
|
||||
<string name="name">Jméno</string>
|
||||
<string name="type">Typ</string>
|
||||
<string name="size">Velikost</string>
|
||||
<string name="def">Výchozí</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Autoincrement</string>
|
||||
<string name="comment">Upravit komentář</string>
|
||||
<string name="commenttext">VLožte komentář pro tuto položku</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Storno</string>
|
||||
<string name="throbber">Prosím čekejte...</string>
|
||||
<string name="options">Nastavení</string>
|
||||
<string name="language">Jazyk</string>
|
||||
<string name="db">Databáze pro nová schémata</string>
|
||||
<string name="optionsnotice">Některá nastavení se projeví až po znovunačtení stránky. Aby nastavení fungovala, je nutné mít zapnuté cookies.</string>
|
||||
<string name="snap">Vzdálenost přichytávání tabulek</string>
|
||||
<string name="optionsnapnotice">V pixelech, 0 = bez přichytávání</string>
|
||||
<string name="pattern">Vzor pro cizí jména</string>
|
||||
<string name="optionpatternnotice">%T = primární tabulka, %R = primární klíč, %t = cizí tabulka</string>
|
||||
<string name="hide">Schovat spojovníky při tažení tabulkou?</string>
|
||||
<string name="vector">Vykreslovat oblé spojovníky (pakliže to prohlížeč podporuje)?</string>
|
||||
<string name="showsize">Zobrazovat velikost polí v tabulce?</string>
|
||||
<string name="showtype">Zobrazovat datový typ polí v tabulce?</string>
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Storno</string>
|
||||
<string name="throbber">Prosím čekejte...</string>
|
||||
<string name="options">Nastavení</string>
|
||||
<string name="language">Jazyk</string>
|
||||
<string name="db">Databáze pro nová schémata</string>
|
||||
<string name="optionsnotice">Některá nastavení se projeví až po znovunačtení stránky. Aby nastavení fungovala, je nutné mít zapnuté cookies.</string>
|
||||
<string name="snap">Vzdálenost přichytávání tabulek</string>
|
||||
<string name="optionsnapnotice">V pixelech, 0 = bez přichytávání</string>
|
||||
<string name="pattern">Vzor pro cizí jména</string>
|
||||
<string name="optionpatternnotice">%T = primární tabulka, %R = primární klíč, %t = cizí tabulka</string>
|
||||
<string name="hide">Schovat spojovníky při tažení tabulkou?</string>
|
||||
<string name="vector">Vykreslovat oblé spojovníky (pakliže to prohlížeč podporuje)?</string>
|
||||
<string name="showsize">Zobrazovat velikost polí v tabulce?</string>
|
||||
<string name="showtype">Zobrazovat datový typ polí v tabulce?</string>
|
||||
<string name="style">Styl</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Klíče</string>
|
||||
<string name="keyslistlabel">Klíče v tabulce "%s"</string>
|
||||
<string name="keytypelabel">Typ:</string>
|
||||
<string name="keynamelabel">Název:</string>
|
||||
<string name="keyfieldslabel">Položky v klíči</string>
|
||||
<string name="keyavaillabel">Dostupné položky</string>
|
||||
<string name="keyedit">Upravit klíč</string>
|
||||
<string name="keyadd">Přidat klíč</string>
|
||||
<string name="keyremove">Smazat klíč</string>
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Klíče</string>
|
||||
<string name="keyslistlabel">Klíče v tabulce "%s"</string>
|
||||
<string name="keytypelabel">Typ:</string>
|
||||
<string name="keynamelabel">Název:</string>
|
||||
<string name="keyfieldslabel">Položky v klíči</string>
|
||||
<string name="keyavaillabel">Dostupné položky</string>
|
||||
<string name="keyedit">Upravit klíč</string>
|
||||
<string name="keyadd">Přidat klíč</string>
|
||||
<string name="keyremove">Smazat klíč</string>
|
||||
|
||||
<!-- io -->
|
||||
<string name="saveload">Uložit / Načíst</string>
|
||||
<string name="empty">Prosím vložte XML data do textového pole níže.</string>
|
||||
<string name="storage">Úložiště</string>
|
||||
<string name="storage.browser">V prohlížeči</string>
|
||||
<string name="storage.clipboard">Schránka</string>
|
||||
<string name="storage.rest">Vzdálený REST server</string>
|
||||
<string name="storage.dropbox">Dropbox</string>
|
||||
<string name="clientsave">Uložit XML</string>
|
||||
<string name="clientload">Načíst XML</string>
|
||||
<string name="clientlocalsave">Uložit v prohlížeči</string>
|
||||
<string name="clientlocalload">Načíst z prohlížeče</string>
|
||||
<string name="clientsql">Generovat SQL</string>
|
||||
<string name="backendlabel">Server backend:</string>
|
||||
<string name="serversave">Uložit</string>
|
||||
<string name="quicksave">Rychle uložit</string>
|
||||
<string name="serverload">Načíst</string>
|
||||
<string name="serverlist">Vypsat položky</string>
|
||||
<string name="serverimport">Importovat z databáze</string>
|
||||
<string name="serverloadprompt">Zadejte označení, pod kterým bylo vaše schéma uloženo:</string>
|
||||
<string name="serversaveprompt">Zadejte označení, pod kterým bude vaše schéma uloženo:</string>
|
||||
<string name="serverimportprompt">Zadejte název databáze k importu:</string>
|
||||
<string name="httpresponse">Odpověď od serveru</string>
|
||||
<string name="http201">Uloženo</string>
|
||||
<string name="http404">Neexistuje</string>
|
||||
<string name="http500">Vnitřní chyba serveru</string>
|
||||
<string name="http501">Není implementováno</string>
|
||||
<string name="http503">Služba není dostupná</string>
|
||||
<!-- io -->
|
||||
<string name="saveload">Uložit / Načíst</string>
|
||||
<string name="empty">Prosím vložte XML data do textového pole níže.</string>
|
||||
<string name="client">Klient</string>
|
||||
<string name="server">Server</string>
|
||||
<string name="output">Vstup / Výstup</string>
|
||||
<string name="clientsave">Uložit XML</string>
|
||||
<string name="clientload">Načíst XML</string>
|
||||
<string name="clientlocalsave">Uložit v prohlížeči</string>
|
||||
<string name="clientlocalload">Načíst z prohlížeče</string>
|
||||
<string name="clientsql">Generovat SQL</string>
|
||||
<string name="backendlabel">Server backend:</string>
|
||||
<string name="serversave">Uložit</string>
|
||||
<string name="quicksave">Rychle uložit</string>
|
||||
<string name="serverload">Načíst</string>
|
||||
<string name="serverlist">Vypsat položky</string>
|
||||
<string name="serverimport">Importovat z databáze</string>
|
||||
<string name="serverloadprompt">Zadejte označení, pod kterým bylo vaše schéma uloženo:</string>
|
||||
<string name="serversaveprompt">Zadejte označení, pod kterým bude vaše schéma uloženo:</string>
|
||||
<string name="serverimportprompt">Zadejte název databáze k importu:</string>
|
||||
<string name="httpresponse">Odpověď od serveru</string>
|
||||
<string name="http201">Uloženo</string>
|
||||
<string name="http404">Neexistuje</string>
|
||||
<string name="http500">Vnitřní chyba serveru</string>
|
||||
<string name="http501">Není implementováno</string>
|
||||
<string name="http503">Služba není dostupná</string>
|
||||
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XML chyba</string>
|
||||
<string name="docs">Dokumentace</string>
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XML chyba</string>
|
||||
<string name="docs">Dokumentace</string>
|
||||
|
||||
</locale>
|
||||
|
||||
@@ -1,94 +1,111 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Tabelle hinzufügen</string>
|
||||
<string name="edittable">Tabelle bearbeiten</string>
|
||||
<string name="removetable">Tabelle entfernen</string>
|
||||
<string name="removetables">Tabellen entfernen</string>
|
||||
<string name="aligntables">Tabellen ausrichten</string>
|
||||
<string name="cleartables">Tabellen löschen</string>
|
||||
<string name="confirmall">Wirklich alle Tabellen löschen</string>
|
||||
<string name="newtable">Neue Tabelle</string>
|
||||
<string name="addpending">Tabelle plazieren</string>
|
||||
<string name="tablenamelabel">Name</string>
|
||||
<string name="tablecommentlabel">Kommentar</string>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Tabelle hinzufügen</string>
|
||||
<string name="edittable">Tabelle bearbeiten</string>
|
||||
<string name="removetable">Tabelle entfernen</string>
|
||||
<string name="removetables">Tabellen entfernen</string>
|
||||
<string name="aligntables">Tabellen ausrichten</string>
|
||||
<string name="cleartables">Tabellen löschen</string>
|
||||
<string name="confirmall">Wollen sie wirklich alle Tabellen löschen?</string>
|
||||
<string name="newtable">Neue Tabelle</string>
|
||||
<string name="addpending">Tabelle platzieren</string>
|
||||
<string name="tablenamelabel">Name</string>
|
||||
<string name="tablecommentlabel">Kommentar</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">Feld hinzufügen</string>
|
||||
<string name="editrow">Feld bearbeiten</string>
|
||||
<string name="removerow">Feld entfernen</string>
|
||||
<string name="uprow">Hoch</string>
|
||||
<string name="downrow">Runter</string>
|
||||
<string name="newrow">Neues Feld</string>
|
||||
<string name="foreigncreate">Fremdschlüssel erstellen</string>
|
||||
<string name="foreignpending">Ziel-Tabelle wählen</string>
|
||||
<string name="foreignconnect">Fremdschlüssel Verknüpfung</string>
|
||||
<string name="foreignconnectpending">Ziel-Zeile auswählen</string>
|
||||
<string name="foreigndisconnect">Ziel-Zeile entfernen</string>
|
||||
<string name="confirmtable">Tabelle wirklich löschen</string>
|
||||
<string name="confirmrow">Feld wirklich löschen</string>
|
||||
<!-- row management -->
|
||||
<string name="addrow">Feld hinzufügen</string>
|
||||
<string name="editrow">Feld bearbeiten</string>
|
||||
<string name="removerow">Feld entfernen</string>
|
||||
<string name="uprow">Hoch</string>
|
||||
<string name="downrow">Runter</string>
|
||||
<string name="newrow">Neues Feld</string>
|
||||
<string name="foreigncreate">Fremdschlüssel erstellen</string>
|
||||
<string name="foreignpending">Ziel-Tabelle wählen</string>
|
||||
<string name="foreignconnect">Fremdschlüssel Verknüpfung</string>
|
||||
<string name="foreignconnectpending">Ziel-Key-Zeile auswählen</string>
|
||||
<string name="foreigndisconnect">Ziel-Key-Zeile entfernen</string>
|
||||
<string name="confirmtable">Tabelle wirklich löschen?</string>
|
||||
<string name="confirmrow">Feld wirklich löschen?</string>
|
||||
|
||||
<!-- row edit -->
|
||||
<string name="name">Name</string>
|
||||
<string name="type">Typ</string>
|
||||
<string name="size">Größe</string>
|
||||
<string name="def">Default</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Autoincrement</string>
|
||||
<string name="comment">Kommentar bearbeiten</string>
|
||||
<string name="commenttext">Kommentar zu diesem Feld eintragen:</string>
|
||||
<!-- row edit -->
|
||||
<string name="name">Name</string>
|
||||
<string name="type">Typ</string>
|
||||
<string name="size">Größe</string>
|
||||
<string name="def">Default</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Autoincrement</string>
|
||||
<string name="comment">Kommentar bearbeiten</string>
|
||||
<string name="commenttext">Kommentar zu diesem Feld eintragen:</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Abbrechen</string>
|
||||
<string name="throbber">Bitte warten...</string>
|
||||
<string name="options">Einstellungen</string>
|
||||
<string name="language">Sprache</string>
|
||||
<string name="db">Datenbank für neue Diagramme</string>
|
||||
<string name="optionsnotice">Einige Optionen werden erst nach einem erneutem Seitenaufruf wirksam. Cookies müssen erlaubt sein.</string>
|
||||
<string name="snap">Tabellen Ausrichtungsabstand</string>
|
||||
<string name="optionsnapnotice">in Pixel, 0 = einrasten deaktivieren</string>
|
||||
<string name="pattern">Format für die Namen der Fremdschlüssel</string>
|
||||
<string name="optionpatternnotice">%T = Primärtabelle, %R = Primärschlüssel, %t = Fremdtabelle</string>
|
||||
<string name="hide">Verstecke Verbindungslinien beim bewegen von Tabellen?</string>
|
||||
<string name="vector">Zeichne gegrümmte Verbindungslinien (Browser-abhängig)?</string>
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Abbrechen</string>
|
||||
<string name="throbber">Bitte warten...</string>
|
||||
<string name="options">Einstellungen</string>
|
||||
<string name="language">Sprache</string>
|
||||
<string name="db">Datenbank für neue Diagramme</string>
|
||||
<string name="optionsnotice">Einige Optionen werden erst nach einem erneutem Seitenaufruf wirksam. Cookies müssen erlaubt sein.</string>
|
||||
<string name="snap">Tabellen Ausrichtungsabstand</string>
|
||||
<string name="optionsnapnotice">in Pixel, 0 = einrasten deaktivieren</string>
|
||||
<string name="pattern">Format für die Namen der Fremdschlüssel</string>
|
||||
<string name="optionpatternnotice">%T = Primärtabelle, %R = Primärschlüssel, %t = Fremdtabelle</string>
|
||||
<string name="hide">Verbindungslinien beim bewegen von Tabellen verstecken?</string>
|
||||
<string name="vector">Zeichne runde Verbindungslinien (Browser-abhängig)?</string>
|
||||
<string name="showsize">Feldgröße im Tabellendesign anzeigen?</string>
|
||||
<string name="showtype">Zeige Felddatentyp im Tabellendesign?</string>
|
||||
<string name="style">Stil</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Schlüssel</string>
|
||||
<string name="keyslistlabel">Schlüssel in der Tabelle "%s"</string>
|
||||
<string name="keytypelabel">Typ:</string>
|
||||
<string name="keynamelabel">Name:</string>
|
||||
<string name="keyfieldslabel">Felder im Schlüssel</string>
|
||||
<string name="keyavaillabel">Verfügbare Felder</string>
|
||||
<string name="keyedit">Schlüssel bearbeiten</string>
|
||||
<string name="keyadd">Schlüssel hinzufügen</string>
|
||||
<string name="keyremove">Schlüssel entfernen</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Schlüssel</string>
|
||||
<string name="keyslistlabel">Schlüssel in Tabelle "%s"</string>
|
||||
<string name="keytypelabel">Typ:</string>
|
||||
<string name="keynamelabel">Name:</string>
|
||||
<string name="keyfieldslabel">Felder im Schlüssel</string>
|
||||
<string name="keyavaillabel">Verfügbare Felder</string>
|
||||
<string name="keyedit">Schlüssel bearbeiten</string>
|
||||
<string name="keyadd">Schlüssel hinzufügen</string>
|
||||
<string name="keyremove">Schlüssel entfernen</string>
|
||||
<!-- io -->
|
||||
<string name="saveload">Speichern / Laden</string>
|
||||
<string name="empty">Bitte fügen Sie die XML-Daten in das untere Textfeld ein und versuchen Sie es erneut.</string>
|
||||
<string name="client">Klient</string>
|
||||
<string name="server">Server</string>
|
||||
<string name="output">Eingabe / Ausgabe</string>
|
||||
<string name="clientsave">XML speichern</string>
|
||||
<string name="clientload">XML laden</string>
|
||||
<string name="clientcopy">Ausgabe Speichern</string>
|
||||
<string name="clientpaste">Kopierten Code einfügen</string>
|
||||
<string name="clientdownloadxml">als XML speichern</string>
|
||||
<string name="clientdownloadtxt">als TXT speichern</string>
|
||||
<string name="clientloadfromfile">Datenbank von Datei laden</string>
|
||||
<string name="clientlocalsave">In Browser speichern</string>
|
||||
<string name="clientlocalload">Von Browser laden</string>
|
||||
<string name="clientlocallist">Von Browser auflisten</string>
|
||||
<string name="dropboxsave">In Dropbox speichern</string>
|
||||
<string name="dropboxload">Von Dropbox laden</string>
|
||||
<string name="dropboxlist">Von Dropbox auflisten</string>
|
||||
<string name="clientsql">SQL generieren</string>
|
||||
<string name="backendlabel">Server Basis:</string>
|
||||
<string name="serversave">Speichern</string>
|
||||
<string name="quicksave">Schnellspeichern</string>
|
||||
<string name="serverload">Laden</string>
|
||||
<string name="serverlist">Einträge auflisten</string>
|
||||
<string name="serverimport">Import aus DB</string>
|
||||
<string name="serverloadprompt">Geben Sie das Stichwort ihres Diagramms ein, unter dem es gespeichert wurde:</string>
|
||||
<string name="serversaveprompt">Geben Sie das Stichwort ihres Diagramms ein, unter dem es gespeichert werden soll:</string>
|
||||
<string name="serverimportprompt">Geben Sie den Namen der zu importierenden Datenbank ein:</string>
|
||||
<string name="httpresponse">Server Antwort</string>
|
||||
<string name="http201">gespeichert</string>
|
||||
<string name="http404">Nicht gefunden</string>
|
||||
<string name="http500">Interner Server Fehler</string>
|
||||
<string name="http501">Nicht implementiert</string>
|
||||
<string name="http503">Dienst nicht erreichbar</string>
|
||||
|
||||
<!-- io -->
|
||||
<string name="saveload">Speichern / Laden</string>
|
||||
<string name="empty">Bitte fügen Sie die XML-Daten in das untere Textfeld ein und versuchen es erneut.</string>
|
||||
<string name="clientsave">XML speichern</string>
|
||||
<string name="clientload">XML laden</string>
|
||||
<string name="clientsql">SQL erzeugen</string>
|
||||
<string name="backendlabel">Server Basis:</string>
|
||||
<string name="serversave">Speichern</string>
|
||||
<string name="serverload">Laden</string>
|
||||
<string name="serverlist">Einträge listen</string>
|
||||
<string name="serverimport">Import aus DB</string>
|
||||
<string name="serverloadprompt">Geben Sie das Stichwort ihres Diagramms ein, unter dem es gespeichert wurde:</string>
|
||||
<string name="serversaveprompt">Geben Sie das Stichwort ihres Diagramms ein, unter dem es gespeichert werden soll:</string>
|
||||
<string name="serverimportprompt">Geben Sie den Namen der zuimportierenden Datenbank ein:</string>
|
||||
<string name="httpresponse">Server Antwort</string>
|
||||
<string name="http201">gespeichert</string>
|
||||
<string name="http404">Nicht gefunden</string>
|
||||
<string name="http500">Interner Server Fehler</string>
|
||||
<string name="http501">Nicht implementiert</string>
|
||||
<string name="http503">Dienst nicht erreichbar</string>
|
||||
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XML Fehler</string>
|
||||
<string name="docs">Dokumentation</string>
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XML Fehler</string>
|
||||
<string name="docs">Dokumentation</string>
|
||||
|
||||
</locale>
|
||||
|
||||
@@ -1,94 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Προσθήκη πίνακα</string>
|
||||
<string name="edittable">Επεξεργασία πίνακα</string>
|
||||
<string name="removetable">Διαγραφή πίνακα</string>
|
||||
<string name="removetables">Διαγραφή πινάκων</string>
|
||||
<string name="aligntables">Στοίχιση Πινάκων</string>
|
||||
<string name="cleartables">Καθαρισμός πινάκων</string>
|
||||
<string name="confirmall">Διαγραφή όλων των πινάκων</string>
|
||||
<string name="newtable">Νέος πίνακας</string>
|
||||
<string name="addpending">τοποθέτηση πίνακα</string>
|
||||
<string name="tablenamelabel">Όνομα</string>
|
||||
<string name="tablecommentlabel">Σχόλιο</string>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Προσθήκη πίνακα</string>
|
||||
<string name="edittable">Επεξεργασία πίνακα</string>
|
||||
<string name="removetable">Διαγραφή πίνακα</string>
|
||||
<string name="removetables">Διαγραφή πινάκων</string>
|
||||
<string name="aligntables">Στοίχιση Πινάκων</string>
|
||||
<string name="cleartables">Καθαρισμός πινάκων</string>
|
||||
<string name="confirmall">Διαγραφή όλων των πινάκων</string>
|
||||
<string name="newtable">Νέος πίνακας</string>
|
||||
<string name="addpending">τοποθέτηση πίνακα</string>
|
||||
<string name="tablenamelabel">Όνομα</string>
|
||||
<string name="tablecommentlabel">Σχόλιο</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">Προσθήκη πεδίου</string>
|
||||
<string name="editrow">Επεξεργασία πεδίου</string>
|
||||
<string name="removerow">Διαγραφή πεδίου</string>
|
||||
<string name="uprow">Πάνω</string>
|
||||
<string name="downrow">Κάτω</string>
|
||||
<string name="newrow">νέο πεδίο</string>
|
||||
<string name="foreigncreate">Δημιουργία ξένου κλειδιού</string>
|
||||
<string name="foreignpending">Κάντε κλικ στο άλλο πίνακα</string>
|
||||
<string name="foreignconnect">Σένδεση ξένου κλειδιού</string>
|
||||
<string name="foreignconnectpending">Κάντε κλικ στη γραμμή</string>
|
||||
<string name="foreigndisconnect">Κάντε κλικ πεδίου</string>
|
||||
<string name="confirmtable">Διαγραφή πίνακα. Είστε σίγουρος</string>
|
||||
<string name="confirmrow">Διαγραφή πεδίου. Είστε σίγουρος</string>
|
||||
<!-- row management -->
|
||||
<string name="addrow">Προσθήκη πεδίου</string>
|
||||
<string name="editrow">Επεξεργασία πεδίου</string>
|
||||
<string name="removerow">Διαγραφή πεδίου</string>
|
||||
<string name="uprow">Πάνω</string>
|
||||
<string name="downrow">Κάτω</string>
|
||||
<string name="newrow">νέο πεδίο</string>
|
||||
<string name="foreigncreate">Δημιουργία ξένου κλειδιού</string>
|
||||
<string name="foreignpending">Κάντε κλικ στο άλλο πίνακα</string>
|
||||
<string name="foreignconnect">Σένδεση ξένου κλειδιού</string>
|
||||
<string name="foreignconnectpending">Κάντε κλικ στη γραμμή</string>
|
||||
<string name="foreigndisconnect">Κάντε κλικ πεδίου</string>
|
||||
<string name="confirmtable">Διαγραφή πίνακα. Είστε σίγουρος</string>
|
||||
<string name="confirmrow">Διαγραφή πεδίου. Είστε σίγουρος</string>
|
||||
|
||||
<!-- row edit -->
|
||||
<string name="name">Όνομα</string>
|
||||
<string name="type">Τύπος</string>
|
||||
<string name="size">Μέγεθος</string>
|
||||
<string name="def">Προεπιλογή</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Autoincrement</string>
|
||||
<string name="comment">Επεξεργασία σχολίου</string>
|
||||
<string name="commenttext">Σχολιάστε γι' αυτό το πεδίο</string>
|
||||
<!-- row edit -->
|
||||
<string name="name">Όνομα</string>
|
||||
<string name="type">Τύπος</string>
|
||||
<string name="size">Μέγεθος</string>
|
||||
<string name="def">Προεπιλογή</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Autoincrement</string>
|
||||
<string name="comment">Επεξεργασία σχολίου</string>
|
||||
<string name="commenttext">Σχολιάστε γι' αυτό το πεδίο</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Άκυρο</string>
|
||||
<string name="throbber">Παρακαλώ περιμένετε...</string>
|
||||
<string name="options">Επιλογές</string>
|
||||
<string name="language">Γλώσσα</string>
|
||||
<string name="db">Βάση δεδομένων για νέα σχέδιαγράμματα</string>
|
||||
<string name="optionsnotice">Μερικές επιλογές ενεργοποιούνται μόνο μετά από καθολική ανανέωση της σελίδας.Τα Cookies πρέπει να είναι ενεργοποιημένα για να λειτουργούν οι επιλογές.</string>
|
||||
<string name="snap">Απόσταση πινάκων</string>
|
||||
<string name="optionsnapnotice">Σε pixels, 0 = απενεργοποίηση απόστασης</string>
|
||||
<string name="pattern">Πρότυπο για ξένα κλειδιά</string>
|
||||
<string name="optionpatternnotice">%T = πρωτεύων πίνακας, %R = προτεύον κλειδί, %t = ξένος πίνακας</string>
|
||||
<string name="hide">Απόκρυψη συνδέσμων όταν σύρονται οι πίνακες;</string>
|
||||
<string name="vector">Διάγραμμα με ομαλούς συνδέσμους(αν παρέχεται από τον περιηγητή);</string>
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Άκυρο</string>
|
||||
<string name="throbber">Παρακαλώ περιμένετε...</string>
|
||||
<string name="options">Επιλογές</string>
|
||||
<string name="language">Γλώσσα</string>
|
||||
<string name="db">Βάση δεδομένων για νέα σχέδιαγράμματα</string>
|
||||
<string name="optionsnotice">Μερικές επιλογές ενεργοποιούνται μόνο μετά από καθολική ανανέωση της σελίδας.Τα Cookies πρέπει να είναι ενεργοποιημένα για να λειτουργούν οι επιλογές.</string>
|
||||
<string name="snap">Απόσταση πινάκων</string>
|
||||
<string name="optionsnapnotice">Σε pixels, 0 = απενεργοποίηση απόστασης</string>
|
||||
<string name="pattern">Πρότυπο για ξένα κλειδιά</string>
|
||||
<string name="optionpatternnotice">%T = πρωτεύων πίνακας, %R = προτεύον κλειδί, %t = ξένος πίνακας</string>
|
||||
<string name="hide">Απόκρυψη συνδέσμων όταν σύρονται οι πίνακες;</string>
|
||||
<string name="vector">Διάγραμμα με ομαλούς συνδέσμους(αν παρέχεται από τον περιηγητή);</string>
|
||||
<string name="style">Στυλ</string>
|
||||
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Κλειδιά</string>
|
||||
<string name="keyslistlabel">Κλειδιά στον πίνακα "%s"</string>
|
||||
<string name="keytypelabel">Τύπος:</string>
|
||||
<string name="keynamelabel">Όνομα:</string>
|
||||
<string name="keyfieldslabel">Πεδία σε κλειδιά</string>
|
||||
<string name="keyavaillabel">Διαθέσιμα πεδία</string>
|
||||
<string name="keyedit">Επεξεργασία κλειδιού</string>
|
||||
<string name="keyadd">Προσθήκη κλειδιού</string>
|
||||
<string name="keyremove">Διαγραφή κλειδιού</string>
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Κλειδιά</string>
|
||||
<string name="keyslistlabel">Κλειδιά στον πίνακα "%s"</string>
|
||||
<string name="keytypelabel">Τύπος:</string>
|
||||
<string name="keynamelabel">Όνομα:</string>
|
||||
<string name="keyfieldslabel">Πεδία σε κλειδιά</string>
|
||||
<string name="keyavaillabel">Διαθέσιμα πεδία</string>
|
||||
<string name="keyedit">Επεξεργασία κλειδιού</string>
|
||||
<string name="keyadd">Προσθήκη κλειδιού</string>
|
||||
<string name="keyremove">Διαγραφή κλειδιού</string>
|
||||
|
||||
<!-- io -->
|
||||
<string name="saveload">Αποθήκ./Άνοιγμα</string>
|
||||
<string name="empty">Κάντε επικόλληση των δεδομένων XML στο πεδίο κειμένου παρακάτω και δοκιμάστε ξανά.</string>
|
||||
<string name="clientsave">Αποθήκευση XML</string>
|
||||
<string name="clientload">Άνοιγμα XML</string>
|
||||
<string name="clientsql">Δημιουργία SQL</string>
|
||||
<string name="backendlabel">Διακομιστής:</string>
|
||||
<string name="serversave">Αποθήκευση</string>
|
||||
<string name="serverload">Άνοιγμα</string>
|
||||
<string name="serverlist">Εμφάνιση λίστας</string>
|
||||
<string name="serverimport">Εισαγωγή από βάση δεδομένων</string>
|
||||
<string name="serverloadprompt">Πληκτρολογήστε το τίτλο του αποθηκευμένου σχεδιαγράμματος:</string>
|
||||
<string name="serversaveprompt">Πληκτρολογήστε το τίτλο για την αποθήκευση του σχεδιαγράμματος:</string>
|
||||
<string name="serverimportprompt">Δώστς όνομα βάσης δεδομένων για εισαγωγή:</string>
|
||||
<string name="httpresponse">Απάντηση διακομιστή</string>
|
||||
<string name="http201">Αποθηκεύθηκε</string>
|
||||
<string name="http404">Δεν βρέθηκε</string>
|
||||
<string name="http500">Εσωτερικό σφάλμα διακομιστή</string>
|
||||
<string name="http501">Χωρίς σχεδίαση</string>
|
||||
<string name="http503">Μη-διαθέσιμη Παροχή</string>
|
||||
<!-- io -->
|
||||
<string name="saveload">Αποθήκ./Άνοιγμα</string>
|
||||
<string name="empty">Κάντε επικόλληση των δεδομένων XML στο πεδίο κειμένου παρακάτω και δοκιμάστε ξανά.</string>
|
||||
<string name="client">Πελάτης</string>
|
||||
<string name="server">Διακομιστής</string>
|
||||
<string name="output">Εισαγωγή/Εξαγωγή</string>
|
||||
<string name="clientsave">Αποθήκευση XML</string>
|
||||
<string name="clientload">Άνοιγμα XML</string>
|
||||
<string name="clientsql">Δημιουργία SQL</string>
|
||||
<string name="backendlabel">Διακομιστής:</string>
|
||||
<string name="serversave">Αποθήκευση</string>
|
||||
<string name="serverload">Άνοιγμα</string>
|
||||
<string name="serverlist">Εμφάνιση λίστας</string>
|
||||
<string name="serverimport">Εισαγωγή από βάση δεδομένων</string>
|
||||
<string name="serverloadprompt">Πληκτρολογήστε το τίτλο του αποθηκευμένου σχεδιαγράμματος:</string>
|
||||
<string name="serversaveprompt">Πληκτρολογήστε το τίτλο για την αποθήκευση του σχεδιαγράμματος:</string>
|
||||
<string name="serverimportprompt">Δώστς όνομα βάσης δεδομένων για εισαγωγή:</string>
|
||||
<string name="httpresponse">Απάντηση διακομιστή</string>
|
||||
<string name="http201">Αποθηκεύθηκε</string>
|
||||
<string name="http404">Δεν βρέθηκε</string>
|
||||
<string name="http500">Εσωτερικό σφάλμα διακομιστή</string>
|
||||
<string name="http501">Χωρίς σχεδίαση</string>
|
||||
<string name="http503">Μη-διαθέσιμη Παροχή</string>
|
||||
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">Σφάλμα XML</string>
|
||||
<string name="docs">Οδηγίες</string>
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">Σφάλμα XML</string>
|
||||
<string name="docs">Οδηγίες</string>
|
||||
|
||||
</locale>
|
||||
|
||||
@@ -1,107 +1,111 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Add table</string>
|
||||
<string name="edittable">Edit table</string>
|
||||
<string name="removetable">Remove table</string>
|
||||
<string name="removetables">Remove tables</string>
|
||||
<string name="aligntables">Align tables</string>
|
||||
<string name="cleartables">Clear tables</string>
|
||||
<string name="confirmall">Really delete all tables</string>
|
||||
<string name="newtable">new table</string>
|
||||
<string name="addpending">place table</string>
|
||||
<string name="tablenamelabel">Name</string>
|
||||
<string name="tablecommentlabel">Comment</string>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Add table</string>
|
||||
<string name="edittable">Edit table</string>
|
||||
<string name="removetable">Remove table</string>
|
||||
<string name="removetables">Remove tables</string>
|
||||
<string name="aligntables">Align tables</string>
|
||||
<string name="cleartables">Clear tables</string>
|
||||
<string name="confirmall">Really delete all tables</string>
|
||||
<string name="newtable">new table</string>
|
||||
<string name="addpending">place table</string>
|
||||
<string name="tablenamelabel">Name</string>
|
||||
<string name="tablecommentlabel">Comment</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">Add field</string>
|
||||
<string name="editrow">Edit field</string>
|
||||
<string name="removerow">Remove field</string>
|
||||
<string name="uprow">Up</string>
|
||||
<string name="downrow">Down</string>
|
||||
<string name="newrow">new field</string>
|
||||
<string name="foreigncreate">Create foreign key</string>
|
||||
<string name="foreignpending">click target table</string>
|
||||
<string name="foreignconnect">Connect foreign key</string>
|
||||
<string name="foreignconnectpending">click target row</string>
|
||||
<string name="foreigndisconnect">Remove foreign key</string>
|
||||
<string name="confirmtable">Really delete table</string>
|
||||
<string name="confirmrow">Really delete field</string>
|
||||
<!-- row management -->
|
||||
<string name="addrow">Add field</string>
|
||||
<string name="editrow">Edit field</string>
|
||||
<string name="removerow">Remove field</string>
|
||||
<string name="uprow">Up</string>
|
||||
<string name="downrow">Down</string>
|
||||
<string name="newrow">new field</string>
|
||||
<string name="foreigncreate">Create foreign key</string>
|
||||
<string name="foreignpending">click target table</string>
|
||||
<string name="foreignconnect">Connect foreign key</string>
|
||||
<string name="foreignconnectpending">click target row</string>
|
||||
<string name="foreigndisconnect">Remove foreign key</string>
|
||||
<string name="confirmtable">Really delete table</string>
|
||||
<string name="confirmrow">Really delete field</string>
|
||||
|
||||
<!-- row edit -->
|
||||
<string name="name">Name</string>
|
||||
<string name="type">Type</string>
|
||||
<string name="size">Size</string>
|
||||
<string name="def">Default</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Autoincrement</string>
|
||||
<string name="comment">Edit comment</string>
|
||||
<string name="commenttext">Enter comment for this field</string>
|
||||
<!-- row edit -->
|
||||
<string name="name">Name</string>
|
||||
<string name="type">Type</string>
|
||||
<string name="size">Size</string>
|
||||
<string name="def">Default</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Autoincrement</string>
|
||||
<string name="comment">Edit comment</string>
|
||||
<string name="commenttext">Enter comment for this field</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Cancel</string>
|
||||
<string name="throbber">Please wait...</string>
|
||||
<string name="options">Options</string>
|
||||
<string name="language">Language</string>
|
||||
<string name="db">Database for new designs</string>
|
||||
<string name="optionsnotice">Some options are applied only after full page reload. Cookies must be enabled for options to work.</string>
|
||||
<string name="snap">Table snap distance</string>
|
||||
<string name="optionsnapnotice">In pixels, 0 = disable snapping</string>
|
||||
<string name="pattern">Pattern for foreign names</string>
|
||||
<string name="optionpatternnotice">%T = primary table, %R = primary key, %t = foreign table</string>
|
||||
<string name="hide">Hide connectors on table drag?</string>
|
||||
<string name="vector">Draw smooth connectors (if supported by browser)?</string>
|
||||
<string name="showsize">Show field size in table design?</string>
|
||||
<string name="showtype">Show field datatype in table design?</string>
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Cancel</string>
|
||||
<string name="throbber">Please wait...</string>
|
||||
<string name="options">Options</string>
|
||||
<string name="language">Language</string>
|
||||
<string name="db">Database for new designs</string>
|
||||
<string name="optionsnotice">Some options are applied only after full page reload. Cookies must be enabled for options to work.</string>
|
||||
<string name="snap">Table snap distance</string>
|
||||
<string name="optionsnapnotice">In pixels, 0 = disable snapping</string>
|
||||
<string name="pattern">Pattern for foreign names</string>
|
||||
<string name="optionpatternnotice">%T = primary table, %R = primary key, %t = foreign table</string>
|
||||
<string name="hide">Hide connectors on table drag?</string>
|
||||
<string name="vector">Draw smooth connectors (if supported by browser)?</string>
|
||||
<string name="showsize">Show field size in table design?</string>
|
||||
<string name="showtype">Show field datatype in table design?</string>
|
||||
<string name="style">Style</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Keys</string>
|
||||
<string name="keyslistlabel">Keys in table "%s"</string>
|
||||
<string name="keytypelabel">Type:</string>
|
||||
<string name="keynamelabel">Name:</string>
|
||||
<string name="keyfieldslabel">Fields in key</string>
|
||||
<string name="keyavaillabel">Available fields</string>
|
||||
<string name="keyedit">Edit key</string>
|
||||
<string name="keyadd">Add key</string>
|
||||
<string name="keyremove">Remove key</string>
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Keys</string>
|
||||
<string name="keyslistlabel">Keys in table "%s"</string>
|
||||
<string name="keytypelabel">Type:</string>
|
||||
<string name="keynamelabel">Name:</string>
|
||||
<string name="keyfieldslabel">Fields in key</string>
|
||||
<string name="keyavaillabel">Available fields</string>
|
||||
<string name="keyedit">Edit key</string>
|
||||
<string name="keyadd">Add key</string>
|
||||
<string name="keyremove">Remove key</string>
|
||||
|
||||
<!-- io -->
|
||||
<string name="saveload">Save / Load</string>
|
||||
<string name="empty">Please paste XML data into the text area below and try again.</string>
|
||||
<string name="storage">Storage</string>
|
||||
<string name="storage.browser">Browser storage</string>
|
||||
<string name="storage.clipboard">System clipboard</string>
|
||||
<string name="storage.rest">Remote REST server</string>
|
||||
<string name="storage.dropbox">Dropbox</string>
|
||||
<string name="clientsave">Save XML</string>
|
||||
<string name="clientload">Load XML</string>
|
||||
<string name="clientlocalsave">Save in Browser</string>
|
||||
<string name="clientlocalload">Load from Browser</string>
|
||||
<string name="clientlocallist">List from Browser</string>
|
||||
<string name="dropboxsave">Save to Dropbox</string>
|
||||
<string name="dropboxload">Load from Dropbox</string>
|
||||
<string name="dropboxlist">List from Dropbox</string>
|
||||
<string name="clientsql">Generate SQL</string>
|
||||
<string name="backendlabel">Server backend:</string>
|
||||
<string name="serversave">Save</string>
|
||||
<string name="quicksave">Quicksave</string>
|
||||
<string name="serverload">Load</string>
|
||||
<string name="serverlist">List items</string>
|
||||
<string name="serverimport">Import from DB</string>
|
||||
<string name="serverloadprompt">Enter keyword under which your design was saved:</string>
|
||||
<string name="serversaveprompt">Enter keyword under which your design will be saved:</string>
|
||||
<string name="serverimportprompt">Enter name of database to be imported:</string>
|
||||
<string name="httpresponse">Server response</string>
|
||||
<string name="http201">Saved</string>
|
||||
<string name="http404">Not Found</string>
|
||||
<string name="http500">Internal Server Error</string>
|
||||
<string name="http501">Not Implemented</string>
|
||||
<string name="http503">Service Unavailable</string>
|
||||
<!-- io -->
|
||||
<string name="saveload">Save / Load</string>
|
||||
<string name="empty">Please paste XML data into the text area below and try again.</string>
|
||||
<string name="client">Client</string>
|
||||
<string name="server">Server</string>
|
||||
<string name="output">Input / Output</string>
|
||||
<string name="clientsave">Save XML</string>
|
||||
<string name="clientload">Load XML</string>
|
||||
<string name="clientlocalsave">Save in Browser</string>
|
||||
<string name="clientlocalload">Load from Browser</string>
|
||||
<string name="clientlocallist">List from Browser</string>
|
||||
<string name="dropboxsave">Save to Dropbox</string>
|
||||
<string name="dropboxload">Load from Dropbox</string>
|
||||
<string name="dropboxlist">List from Dropbox</string>
|
||||
<string name="clientsql">Generate SQL</string>
|
||||
<string name="clientcopy">Copy Output</string>
|
||||
<string name="clientpaste">Paste from Clipboard</string>
|
||||
<string name="clientdownloadxml">Download as XML</string>
|
||||
<string name="clientdownloadtxt">Download as TXT</string>
|
||||
<string name="clientloadfromfile">Load Database from file</string>
|
||||
<string name="backendlabel">Server backend:</string>
|
||||
<string name="serversave">Save</string>
|
||||
<string name="quicksave">Quicksave</string>
|
||||
<string name="serverload">Load</string>
|
||||
<string name="serverlist">List items</string>
|
||||
<string name="serverimport">Import from DB</string>
|
||||
<string name="serverloadprompt">Enter keyword under which your design was saved:</string>
|
||||
<string name="serversaveprompt">Enter keyword under which your design will be saved:</string>
|
||||
<string name="serverimportprompt">Enter name of database to be imported:</string>
|
||||
<string name="httpresponse">Server response</string>
|
||||
<string name="http201">Saved</string>
|
||||
<string name="http404">Not Found</string>
|
||||
<string name="http500">Internal Server Error</string>
|
||||
<string name="http501">Not Implemented</string>
|
||||
<string name="http503">Service Unavailable</string>
|
||||
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XML error</string>
|
||||
<string name="docs">Documentation</string>
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XML error</string>
|
||||
<string name="docs">Documentation</string>
|
||||
|
||||
</locale>
|
||||
|
||||
@@ -1,96 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Aldoni tabelon</string>
|
||||
<string name="edittable">Modifi la tabelon</string>
|
||||
<string name="removetable">Forigi la tabelon</string>
|
||||
<string name="removetables">Forigi la tabelojn</string>
|
||||
<string name="aligntables">Ĝisrandigi la tabelojn</string>
|
||||
<string name="cleartables">Vakigi la tabelon</string>
|
||||
<string name="confirmall">Ja forigi ĉiujn tabelojn</string>
|
||||
<string name="newtable">nova tabelo</string>
|
||||
<string name="addpending">pozicii la tabelon</string>
|
||||
<string name="tablenamelabel">Nomo</string>
|
||||
<string name="tablecommentlabel">Komento</string>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Aldoni tabelon</string>
|
||||
<string name="edittable">Modifi la tabelon</string>
|
||||
<string name="removetable">Forigi la tabelon</string>
|
||||
<string name="removetables">Forigi la tabelojn</string>
|
||||
<string name="aligntables">Ĝisrandigi la tabelojn</string>
|
||||
<string name="cleartables">Vakigi la tabelon</string>
|
||||
<string name="confirmall">Ja forigi ĉiujn tabelojn</string>
|
||||
<string name="newtable">nova tabelo</string>
|
||||
<string name="addpending">pozicii la tabelon</string>
|
||||
<string name="tablenamelabel">Nomo</string>
|
||||
<string name="tablecommentlabel">Komento</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">Aldoni kampon</string>
|
||||
<string name="editrow">Modifi la kampon</string>
|
||||
<string name="removerow">Forigi la kampon</string>
|
||||
<string name="uprow">Supre</string>
|
||||
<string name="downrow">Sube</string>
|
||||
<string name="newrow">nova kampo</string>
|
||||
<string name="foreigncreate">Krei fremdan ŝlosilon</string>
|
||||
<string name="foreignpending">alklaki la celan tabelon</string>
|
||||
<string name="foreignconnect">Konekti fremdan ŝlosilon</string>
|
||||
<string name="foreignconnectpending">alklaki la celan atributon</string>
|
||||
<string name="foreigndisconnect">Forigi fremdan ŝlosilon</string>
|
||||
<string name="confirmtable">Ja forigi la tabelon</string>
|
||||
<string name="confirmrow">Ja forigi la kampon</string>
|
||||
<!-- row management -->
|
||||
<string name="addrow">Aldoni kampon</string>
|
||||
<string name="editrow">Modifi la kampon</string>
|
||||
<string name="removerow">Forigi la kampon</string>
|
||||
<string name="uprow">Supre</string>
|
||||
<string name="downrow">Sube</string>
|
||||
<string name="newrow">nova kampo</string>
|
||||
<string name="foreigncreate">Krei fremdan ŝlosilon</string>
|
||||
<string name="foreignpending">alklaki la celan tabelon</string>
|
||||
<string name="foreignconnect">Konekti fremdan ŝlosilon</string>
|
||||
<string name="foreignconnectpending">alklaki la celan atributon</string>
|
||||
<string name="foreigndisconnect">Forigi fremdan ŝlosilon</string>
|
||||
<string name="confirmtable">Ja forigi la tabelon</string>
|
||||
<string name="confirmrow">Ja forigi la kampon</string>
|
||||
|
||||
<!-- row edit -->
|
||||
<string name="name">Nomo</string>
|
||||
<string name="type">Tipo</string>
|
||||
<string name="size">Grandeco</string>
|
||||
<string name="def">Defaŭlte</string>
|
||||
<string name="notnull">NE NUL</string>
|
||||
<string name="null">Senvalora</string>
|
||||
<string name="ai">Memalkremento</string>
|
||||
<string name="comment">Modifi la komenton</string>
|
||||
<string name="commenttext">Entajpi komenton por tiu kampo</string>
|
||||
<!-- row edit -->
|
||||
<string name="name">Nomo</string>
|
||||
<string name="type">Tipo</string>
|
||||
<string name="size">Grandeco</string>
|
||||
<string name="def">Defaŭlte</string>
|
||||
<string name="notnull">NE NUL</string>
|
||||
<string name="null">Senvalora</string>
|
||||
<string name="ai">Memalkremento</string>
|
||||
<string name="comment">Modifi la komenton</string>
|
||||
<string name="commenttext">Entajpi komenton por tiu kampo</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">Jes</string>
|
||||
<string name="windowcancel">Rezigni</string>
|
||||
<string name="throbber">Bonvolu atendi...</string>
|
||||
<string name="options">Agordoj</string>
|
||||
<string name="language">Lingvo</string>
|
||||
<string name="db">Datumbazoj por novaj kreoj</string>
|
||||
<string name="optionsnotice">Kelkaj agordoj estas aplikotaj post plena ŝarĝo de paĝo. Kuketoj devas esti ebligataj por ke la agordoj funkcias.</string>
|
||||
<string name="snap">Kapto-distanco de tabelo</string>
|
||||
<string name="optionsnapnotice">En rastrumeroj, 0 = malebligi kapton</string>
|
||||
<string name="pattern">Motivo por fremdaj nomoj</string>
|
||||
<string name="optionpatternnotice">%T = ĉefa tabelo, %R = ĉefa ŝlosilo, %t = fremda tabelo</string>
|
||||
<string name="hide">Ĉu kaŝi konektiloj dum treno de tabelo?</string>
|
||||
<string name="vector">Desegni glatajn konektilojn (se subtenata de retumilo)?</string>
|
||||
<string name="showsize">Show field size in table design?</string>
|
||||
<string name="showtype">Show field datatype in table design?</string>
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">Jes</string>
|
||||
<string name="windowcancel">Rezigni</string>
|
||||
<string name="throbber">Bonvolu atendi...</string>
|
||||
<string name="options">Agordoj</string>
|
||||
<string name="language">Lingvo</string>
|
||||
<string name="db">Datumbazoj por novaj kreoj</string>
|
||||
<string name="optionsnotice">Kelkaj agordoj estas aplikotaj post plena ŝarĝo de paĝo. Kuketoj devas esti ebligataj por ke la agordoj funkcias.</string>
|
||||
<string name="snap">Kapto-distanco de tabelo</string>
|
||||
<string name="optionsnapnotice">En rastrumeroj, 0 = malebligi kapton</string>
|
||||
<string name="pattern">Motivo por fremdaj nomoj</string>
|
||||
<string name="optionpatternnotice">%T = ĉefa tabelo, %R = ĉefa ŝlosilo, %t = fremda tabelo</string>
|
||||
<string name="hide">Ĉu kaŝi konektiloj dum treno de tabelo?</string>
|
||||
<string name="vector">Desegni glatajn konektilojn (se subtenata de retumilo)?</string>
|
||||
<string name="showsize">Show field size in table design?</string>
|
||||
<string name="showtype">Show field datatype in table design?</string>
|
||||
<string name="style">Stilo</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Klavoj</string>
|
||||
<string name="keyslistlabel">Ŝlosiloj en la tabelo "%s"</string>
|
||||
<string name="keytypelabel">Tipo:</string>
|
||||
<string name="keynamelabel">Nomo:</string>
|
||||
<string name="keyfieldslabel">Kampoj en klavo</string>
|
||||
<string name="keyavaillabel">Disponeblaj kampoj</string>
|
||||
<string name="keyedit">Modifi ŝlosilon</string>
|
||||
<string name="keyadd">Aldoni ŝlosilon</string>
|
||||
<string name="keyremove">Forigi ŝlosilon</string>
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Klavoj</string>
|
||||
<string name="keyslistlabel">Ŝlosiloj en la tabelo "%s"</string>
|
||||
<string name="keytypelabel">Tipo:</string>
|
||||
<string name="keynamelabel">Nomo:</string>
|
||||
<string name="keyfieldslabel">Kampoj en klavo</string>
|
||||
<string name="keyavaillabel">Disponeblaj kampoj</string>
|
||||
<string name="keyedit">Modifi ŝlosilon</string>
|
||||
<string name="keyadd">Aldoni ŝlosilon</string>
|
||||
<string name="keyremove">Forigi ŝlosilon</string>
|
||||
|
||||
<!-- io -->
|
||||
<string name="saveload">Konservi / Ŝargi</string>
|
||||
<string name="empty">Bonvolu alglui XML datumon en la tekst-zono sube kaj provi de nove.</string>
|
||||
<string name="clientsave">Konservi XML</string>
|
||||
<string name="clientload">Ŝargi XML</string>
|
||||
<string name="clientsql">Krei SQL</string>
|
||||
<string name="backendlabel">Servila administro:</string>
|
||||
<string name="serversave">Konservi</string>
|
||||
<string name="quicksave">Quicksave</string>
|
||||
<string name="serverload">Ŝargi</string>
|
||||
<string name="serverlist">Listigi erojn</string>
|
||||
<string name="serverimport">Importi el datumbazo</string>
|
||||
<string name="serverloadprompt">Entajpi ŝlosilvorton per kiu via fasonado estis konservita:</string>
|
||||
<string name="serversaveprompt">Entajpi ŝlosilvorton per kiu via fasonado estos konservita:</string>
|
||||
<string name="serverimportprompt">Entajpi la nomon de datumbazo importenda:</string>
|
||||
<string name="httpresponse">Respondo de servilo</string>
|
||||
<string name="http201">Konservita</string>
|
||||
<string name="http404">Netrovita</string>
|
||||
<string name="http500">Interna Servilo Eraro</string>
|
||||
<string name="http501">Ne funkciigata</string>
|
||||
<string name="http503">Servo Nedisponebla</string>
|
||||
<!-- io -->
|
||||
<string name="saveload">Konservi / Ŝargi</string>
|
||||
<string name="empty">Bonvolu alglui XML datumon en la tekst-zono sube kaj provi de nove.</string>
|
||||
<string name="client">Kliento</string>
|
||||
<string name="server">Servilo</string>
|
||||
<string name="output">Enigo / Eligo</string>
|
||||
<string name="clientsave">Konservi XML</string>
|
||||
<string name="clientload">Ŝargi XML</string>
|
||||
<string name="clientsql">Krei SQL</string>
|
||||
<string name="backendlabel">Servila administro:</string>
|
||||
<string name="serversave">Konservi</string>
|
||||
<string name="quicksave">Quicksave</string>
|
||||
<string name="serverload">Ŝargi</string>
|
||||
<string name="serverlist">Listigi erojn</string>
|
||||
<string name="serverimport">Importi el datumbazo</string>
|
||||
<string name="serverloadprompt">Entajpi ŝlosilvorton per kiu via fasonado estis konservita:</string>
|
||||
<string name="serversaveprompt">Entajpi ŝlosilvorton per kiu via fasonado estos konservita:</string>
|
||||
<string name="serverimportprompt">Entajpi la nomon de datumbazo importenda:</string>
|
||||
<string name="httpresponse">Respondo de servilo</string>
|
||||
<string name="http201">Konservita</string>
|
||||
<string name="http404">Netrovita</string>
|
||||
<string name="http500">Interna Servilo Eraro</string>
|
||||
<string name="http501">Ne funkciigata</string>
|
||||
<string name="http503">Servo Nedisponebla</string>
|
||||
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XML-eraro</string>
|
||||
<string name="docs">Dokumentaro</string>
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XML-eraro</string>
|
||||
<string name="docs">Dokumentaro</string>
|
||||
|
||||
</locale>
|
||||
|
||||
@@ -1,95 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Agregar tabla</string>
|
||||
<string name="edittable">Editar tabla</string>
|
||||
<string name="removetable">Remover tabla</string>
|
||||
<string name="removetable">Remover tablas</string>
|
||||
<string name="aligntables">Alinear tablas</string>
|
||||
<string name="cleartables">Limpiar tablas</string>
|
||||
<string name="confirmall">Realmente borrar todas las tablas</string>
|
||||
<string name="newtable">Nueva tabla</string>
|
||||
<string name="addpending">Posicionar tabla</string>
|
||||
<string name="tablenamelabel">Nombre</string>
|
||||
<string name="tablecommentlabel">Comentario</string>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Agregar tabla</string>
|
||||
<string name="edittable">Editar tabla</string>
|
||||
<string name="removetable">Eliminar tabla</string>
|
||||
<string name="removetables">Eliminar tablas</string>
|
||||
<string name="aligntables">Alinear tablas</string>
|
||||
<string name="cleartables">Limpiar tablas</string>
|
||||
<string name="confirmall">¿Realmente deseas eliminar todas las tablas</string>
|
||||
<string name="newtable">Nueva tabla</string>
|
||||
<string name="addpending">Colocar tabla</string>
|
||||
<string name="tablenamelabel">Nombre</string>
|
||||
<string name="tablecommentlabel">Comentario</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">Agregar campo</string>
|
||||
<string name="editrow">Editar campo</string>
|
||||
<string name="removerow">Remover campo</string>
|
||||
<string name="uprow">Arriba</string>
|
||||
<string name="downrow">Abajo</string>
|
||||
<string name="newrow">Nuevo campo</string>
|
||||
<string name="foreigncreate">Crear llave foránea</string>
|
||||
<string name="foreignpending">Conectar llave foránea</string>
|
||||
<string name="foreignconnect">Conectar llave foránea</string>
|
||||
<string name="foreignconnectpending">Hacer clic en el registro</string>
|
||||
<string name="foreigndisconnect">Remover llave foránea</string>
|
||||
<string name="confirmtable">Realmente borrar tabla</string>
|
||||
<string name="confirmrow">Realmente borrar campo</string>
|
||||
<!-- row management -->
|
||||
<string name="addrow">Agregar campo</string>
|
||||
<string name="editrow">Editar campo</string>
|
||||
<string name="removerow">Eliminar campo</string>
|
||||
<string name="uprow">Arriba</string>
|
||||
<string name="downrow">Abajo</string>
|
||||
<string name="newrow">Nuevo campo</string>
|
||||
<string name="foreigncreate">Crear llave foránea</string>
|
||||
<string name="foreignpending">Haz clic en tabla objetivo</string>
|
||||
<string name="foreignconnect">Conectar llave foránea</string>
|
||||
<string name="foreignconnectpending">Haz clic en campo objetivo</string>
|
||||
<string name="foreigndisconnect">Eliminar clave foránea</string>
|
||||
<string name="confirmtable">¿Realmente deseas borrar la tabla</string>
|
||||
<string name="confirmrow">¿Realmente deseas borrar el campo</string>
|
||||
|
||||
<!-- row edit -->
|
||||
<string name="name">Nombre</string>
|
||||
<string name="type">Tipo</string>
|
||||
<string name="size">Tamaño</string>
|
||||
<string name="def">Valor por predeterminado</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Auto incremento</string>
|
||||
<string name="comment">Editar comentario</string>
|
||||
<string name="commenttext">Entrar comentario para este campo</string>
|
||||
<!-- row edit -->
|
||||
<string name="name">Nombre</string>
|
||||
<string name="type">Tipo</string>
|
||||
<string name="size">Tamaño</string>
|
||||
<string name="def">Predeterminado</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Auto incremento</string>
|
||||
<string name="comment">Editar comentario</string>
|
||||
<string name="commenttext">Ingresa un comentario para este campo</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">Aceptar</string>
|
||||
<string name="windowcancel">Cancelar</string>
|
||||
<string name="throbber">Por favor esperar...</string>
|
||||
<string name="options">Opciones</string>
|
||||
<string name="language">Lenguaje</string>
|
||||
<string name="db">Base de datos para nuevos diseños</string>
|
||||
<string name="optionsnotice">Algunas opciones son aplicadas solo despúes de recargar totalmente la pagina. Las cookies deben estar
|
||||
habilitadas para opciones de trabajo.</string>
|
||||
<string name="snap">Tabla acceso remoto</string>
|
||||
<string name="optionsnapnotice">En píxeles, 0 = deshabilitar acceso remoto</string>
|
||||
<string name="pattern">Patrón para nombres foráneos</string>
|
||||
<string name="optionpatternnotice">%T = tabla primaria, %R = llave primaria, %t = tabla foránea</string>
|
||||
<string name="hide">Esconder conectores en la tabla al arrastrar?</string>
|
||||
<string name="vector">Dibujar conectores suave (si son soportados por el navegador)?</string>
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">Aceptar</string>
|
||||
<string name="windowcancel">Cancelar</string>
|
||||
<string name="throbber">Por favor, espera...</string>
|
||||
<string name="options">Opciones</string>
|
||||
<string name="language">Idioma</string>
|
||||
<string name="db">Base de datos para nuevos diseños</string>
|
||||
<string name="optionsnotice">Algunas opciones se aplican solo despúes de recargar totalmente la pagina. Las cookies deben estar habilitadas para que funcione la personalización.</string>
|
||||
<string name="snap">Distancia de ajuste de tablas</string>
|
||||
<string name="optionsnapnotice">En píxeles, 0 = deshabilitar ajuste</string>
|
||||
<string name="pattern">Patrón para nombres de llave foránea</string>
|
||||
<string name="optionpatternnotice">%T = tabla primaria, %R = clave primaria, %t = tabla foránea</string>
|
||||
<string name="hide">¿Ocultar conectores de tablas al arrastrar?</string>
|
||||
<string name="vector">¿Dibujar conectores suaves (si son soportados por el navegador)?</string>
|
||||
<string name="showsize">¿Mostrar tamaño del campo en el diseño de tabla?</string>
|
||||
<string name="showtype">¿Mostrar tipo de dato del campo en el diseño de tabla?</string>
|
||||
<string name="style">Estilo</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Claves</string>
|
||||
<string name="keyslistlabel">Llaves en la tabla "%s"</string>
|
||||
<string name="keytypelabel">Tipo:</string>
|
||||
<string name="keynamelabel">Nombre:</string>
|
||||
<string name="keyfieldslabel">Campos de llave</string>
|
||||
<string name="keyavaillabel">Campos disponibles</string>
|
||||
<string name="keyedit">Editar llave</string>
|
||||
<string name="keyadd">Agregar llave</string>
|
||||
<string name="keyremove">Eliminar llave</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Llaves</string>
|
||||
<string name="keyslistlabel">Llaves en la tabla "%s"</string>
|
||||
<string name="keytypelabel">Tipo:</string>
|
||||
<string name="keynamelabel">Nombre:</string>
|
||||
<string name="keyfieldslabel">Campos en la llave</string>
|
||||
<string name="keyavaillabel">Campos disponibles</string>
|
||||
<string name="keyedit">Editar llave</string>
|
||||
<string name="keyadd">Agregar llave</string>
|
||||
<string name="keyremove">Remover llave</string>
|
||||
<!-- io -->
|
||||
<string name="saveload">Guardar / Cargar</string>
|
||||
<string name="empty">Por favor, pega los datos XML dentro del área de texto de abajo y vuelve a intentar.</string>
|
||||
<string name="client">Cliente</string>
|
||||
<string name="server">Servidor</string>
|
||||
<string name="output">Entrada / Salida</string>
|
||||
<string name="clientsave">Guardar XML</string>
|
||||
<string name="clientload">Cargar XML</string>
|
||||
<string name="clientlocalsave">Guardar en el Navegador</string>
|
||||
<string name="clientlocalload">Cargar desde el Navegador</string>
|
||||
<string name="clientlocallist">Listar desde el Navegador</string>
|
||||
<string name="dropboxsave">Guardar en Dropbox</string>
|
||||
<string name="dropboxload">Cargar desde Dropbox</string>
|
||||
<string name="dropboxlist">Listar desde Dropbox</string>
|
||||
<string name="clientsql">Generar SQL</string>
|
||||
<string name="backendlabel">Servidor de fondo:</string>
|
||||
<string name="serversave">Guardar</string>
|
||||
<string name="quicksave">Guardar rápido</string>
|
||||
<string name="serverload">Cargar</string>
|
||||
<string name="serverlist">Listar elementos</string>
|
||||
<string name="serverimport">Importar desde Base de Datos</string>
|
||||
<string name="serverloadprompt">Ingrese la palabra clave bajo la cual tu diseño fue guardado:</string>
|
||||
<string name="serversaveprompt">Ingrese una palabra clave bajo la cual tu diseño será guardado:</string>
|
||||
<string name="serverimportprompt">Ingresa el nombre de la base de datos a ser importada:</string>
|
||||
<string name="httpresponse">Respuesta del servidor</string>
|
||||
<string name="http201">Guardado</string>
|
||||
<string name="http404">No Encontrado</string>
|
||||
<string name="http500">Error Interno del Servidor</string>
|
||||
<string name="http501">No Implementado</string>
|
||||
<string name="http503">Servicio No Disponible</string>
|
||||
|
||||
<!-- io -->
|
||||
<string name="saveload">Guardar / Cargar</string>
|
||||
<string name="empty">Favor de pegar el XML dentro del área de texto siguiente e intentar nuevamente.</string>
|
||||
<string name="clientsave">Guardar XML</string>
|
||||
<string name="clientload">Cargar XML</string>
|
||||
<string name="clientsql">Generar SQL</string>
|
||||
<string name="backendlabel">Servidor backend:</string>
|
||||
<string name="serversave">Guardar</string>
|
||||
<string name="serverload">Cargar</string>
|
||||
<string name="serverlist">Lista de articulos</string>
|
||||
<string name="serverimport">Importar desde BD</string>
|
||||
<string name="serverloadprompt">Entrar palabra bajo la cual tu diseño fue guardado:</string>
|
||||
<string name="serversaveprompt">Entrar palabra bajo la cual tu diseño va a ser guardado:</string>
|
||||
<string name="serverimportprompt">Entrar nombre de base de datos a ser importada:</string>
|
||||
<string name="httpresponse">Respuesta del servidor</string>
|
||||
<string name="http201">Guardado</string>
|
||||
<string name="http404">No Encontrado</string>
|
||||
<string name="http500">Error Interno del Servidor</string>
|
||||
<string name="http501">No Implementado</string>
|
||||
<string name="http503">Servicio No Disponible</string>
|
||||
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XML error</string>
|
||||
<string name="docs">Documentación</string>
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">Error XML</string>
|
||||
<string name="docs">Documentación</string>
|
||||
|
||||
</locale>
|
||||
|
||||
@@ -1,99 +1,103 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Ajouter une table</string>
|
||||
<string name="edittable">Éditer la table</string>
|
||||
<string name="removetable">Supprimer la table</string>
|
||||
<string name="removetables">Supprimer les tables</string>
|
||||
<string name="aligntables">Aligner les tables</string>
|
||||
<string name="cleartables">Supprimer les tables</string>
|
||||
<string name="confirmall">Vraiment supprimer toutes les tables</string>
|
||||
<string name="newtable">nouvelle table</string>
|
||||
<string name="addpending">positionner la table</string>
|
||||
<string name="tablenamelabel">Nom</string>
|
||||
<string name="tablecommentlabel">Commentaire</string>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Ajouter une table</string>
|
||||
<string name="edittable">Éditer la table</string>
|
||||
<string name="removetable">Supprimer la table</string>
|
||||
<string name="removetables">Supprimer les tables</string>
|
||||
<string name="aligntables">Aligner les tables</string>
|
||||
<string name="cleartables">Supprimer les tables</string>
|
||||
<string name="confirmall">Vraiment supprimer toutes les tables</string>
|
||||
<string name="newtable">nouvelle table</string>
|
||||
<string name="addpending">positionner la table</string>
|
||||
<string name="tablenamelabel">Nom</string>
|
||||
<string name="tablecommentlabel">Commentaire</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">Ajouter un champ</string>
|
||||
<string name="editrow">Éditer un champ</string>
|
||||
<string name="removerow">Supprimer le champ</string>
|
||||
<string name="uprow">Remonter</string>
|
||||
<string name="downrow">Descendre</string>
|
||||
<string name="newrow">Éditer un champ</string>
|
||||
<string name="foreigncreate">Créer une clé étrangère</string>
|
||||
<string name="foreignpending">Cliquez la destination</string>
|
||||
<string name="foreignconnect">Connecter une clé étrangère</string>
|
||||
<string name="foreignconnectpending">Cliquez la propriété cible</string>
|
||||
<string name="foreigndisconnect">Supprimer la clé étrangère</string>
|
||||
<string name="confirmtable">Voulez-vous vraiment supprimer cette table ?</string>
|
||||
<string name="confirmrow">Voulez-vous vraiment supprimer ce champ ?</string>
|
||||
<!-- row management -->
|
||||
<string name="addrow">Ajouter un champ</string>
|
||||
<string name="editrow">Éditer un champ</string>
|
||||
<string name="removerow">Supprimer le champ</string>
|
||||
<string name="uprow">Remonter</string>
|
||||
<string name="downrow">Descendre</string>
|
||||
<string name="newrow">Éditer un champ</string>
|
||||
<string name="foreigncreate">Créer une clé étrangère</string>
|
||||
<string name="foreignpending">Cliquez la destination</string>
|
||||
<string name="foreignconnect">Connecter une clé étrangère</string>
|
||||
<string name="foreignconnectpending">Cliquez la propriété cible</string>
|
||||
<string name="foreigndisconnect">Supprimer la clé étrangère</string>
|
||||
<string name="confirmtable">Voulez-vous vraiment supprimer cette table ?</string>
|
||||
<string name="confirmrow">Voulez-vous vraiment supprimer ce champ ?</string>
|
||||
|
||||
<!-- row edit -->
|
||||
<string name="name">Nom</string>
|
||||
<string name="type">Type</string>
|
||||
<string name="size">Taille</string>
|
||||
<string name="def">Défaut</string>
|
||||
<string name="notnull">NON NUL</string>
|
||||
<string name="null">valeur nulle</string>
|
||||
<string name="ai">Auto-incrémental</string>
|
||||
<string name="comment">Éditer le commentaire</string>
|
||||
<string name="commenttext">Saisir un commentaire à propos de ce champ</string>
|
||||
<!-- row edit -->
|
||||
<string name="name">Nom</string>
|
||||
<string name="type">Type</string>
|
||||
<string name="size">Taille</string>
|
||||
<string name="def">Défaut</string>
|
||||
<string name="notnull">NON NUL</string>
|
||||
<string name="null">valeur nulle</string>
|
||||
<string name="ai">Auto-incrémental</string>
|
||||
<string name="comment">Éditer le commentaire</string>
|
||||
<string name="commenttext">Saisir un commentaire à propos de ce champ</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Annuler</string>
|
||||
<string name="throbber">Veuillez patienter...</string>
|
||||
<string name="options">Options</string>
|
||||
<string name="language">Langue</string>
|
||||
<string name="db">Format des nouvelles base de données</string>
|
||||
<string name="optionsnotice">Ces options ne seront appliquées qu'après le rafraichissement complet de la page. Les cookies doivent être autorisés.</string>
|
||||
<string name="snap">Magnétisme des tables</string>
|
||||
<string name="optionsnapnotice">En pixels, 0 = magnétisme désactivé</string>
|
||||
<string name="pattern">Motif pour les noms de clés étrangères</string>
|
||||
<string name="optionpatternnotice">%T = table primaire, %R = clé primaire, %t = table étrangère</string>
|
||||
<string name="hide">Cacher les connecteurs lors du déplacement des tables ?</string>
|
||||
<string name="vector">Dessiner des connecteurs « adoucis » (si le navigateur le supporte) ?</string>
|
||||
<string name="showsize">Afficher la taille du champ dans le schéma de table ?</string>
|
||||
<string name="showtype">Afficher le type du champ dans le schéma de table ?</string>
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Annuler</string>
|
||||
<string name="throbber">Veuillez patienter...</string>
|
||||
<string name="options">Options</string>
|
||||
<string name="language">Langue</string>
|
||||
<string name="db">Format des nouvelles base de données</string>
|
||||
<string name="optionsnotice">Ces options ne seront appliquées qu'après le rafraichissement complet de la page. Les cookies doivent être autorisés.</string>
|
||||
<string name="snap">Magnétisme des tables</string>
|
||||
<string name="optionsnapnotice">En pixels, 0 = magnétisme désactivé</string>
|
||||
<string name="pattern">Motif pour les noms de clés étrangères</string>
|
||||
<string name="optionpatternnotice">%T = table primaire, %R = clé primaire, %t = table étrangère</string>
|
||||
<string name="hide">Cacher les connecteurs lors du déplacement des tables ?</string>
|
||||
<string name="vector">Dessiner des connecteurs « adoucis » (si le navigateur le supporte) ?</string>
|
||||
<string name="showsize">Afficher la taille du champ dans le schéma de table ?</string>
|
||||
<string name="showtype">Afficher le type du champ dans le schéma de table ?</string>
|
||||
<string name="style">Style</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Clés</string>
|
||||
<string name="keyslistlabel">Clés dans la table « %s »</string>
|
||||
<string name="keytypelabel">Type :</string>
|
||||
<string name="keynamelabel">Nom :</string>
|
||||
<string name="keyfieldslabel">Champs de clé</string>
|
||||
<string name="keyavaillabel">Champs disponibles</string>
|
||||
<string name="keyedit">Éditer la clé</string>
|
||||
<string name="keyadd">Ajouter une clé</string>
|
||||
<string name="keyremove">Supprimer la clé</string>
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Clés</string>
|
||||
<string name="keyslistlabel">Clés dans la table « %s »</string>
|
||||
<string name="keytypelabel">Type :</string>
|
||||
<string name="keynamelabel">Nom :</string>
|
||||
<string name="keyfieldslabel">Champs de clé</string>
|
||||
<string name="keyavaillabel">Champs disponibles</string>
|
||||
<string name="keyedit">Éditer la clé</string>
|
||||
<string name="keyadd">Ajouter une clé</string>
|
||||
<string name="keyremove">Supprimer la clé</string>
|
||||
|
||||
<!-- io -->
|
||||
<string name="saveload">Enregistrer / Charger</string>
|
||||
<string name="empty">Merci de coller les données XML dans le champs prévu avant de ré-essayer.</string>
|
||||
<string name="clientsave">Enregistrer XML</string>
|
||||
<string name="clientload">Charger XML</string>
|
||||
<string name="clientlocalsave">Enregistrer dans le navigateur</string>
|
||||
<string name="clientlocalload">Charger depuis le navigateur</string>
|
||||
<string name="clientlocallist">Lister depuis le navigateur</string>
|
||||
<string name="clientsql">Génerer SQL</string>
|
||||
<string name="backendlabel">Méthode du serveur :</string>
|
||||
<string name="serversave">Enregistrer</string>
|
||||
<string name="quicksave">Enregistrer rapidement</string>
|
||||
<string name="serverload">Charger</string>
|
||||
<string name="serverlist">Éléments disponibles</string>
|
||||
<string name="serverimport">Importer d'une base de données</string>
|
||||
<string name="serverloadprompt">Saisir le mot-clé de votre schéma :</string>
|
||||
<string name="serversaveprompt">Saisir un mot-clé pour sauvegarder votre schéma :</string>
|
||||
<string name="serverimportprompt">Saisir le nom de la base de données à importer :</string>
|
||||
<string name="httpresponse">Réponse du serveur</string>
|
||||
<string name="http201">Sauvegardé</string>
|
||||
<string name="http404">Introuvable</string>
|
||||
<string name="http500">Erreur interne du serveur</string>
|
||||
<string name="http501">Non Implementé</string>
|
||||
<string name="http503">Service indisponible</string>
|
||||
<!-- io -->
|
||||
<string name="saveload">Enregistrer / Charger</string>
|
||||
<string name="empty">Merci de coller les données XML dans le champs prévu avant de ré-essayer.</string>
|
||||
<string name="client">Client</string>
|
||||
<string name="server">Serveur</string>
|
||||
<string name="output">Entrée / Sortie</string>
|
||||
<string name="clientsave">Enregistrer XML</string>
|
||||
<string name="clientload">Charger XML</string>
|
||||
<string name="clientlocalsave">Enregistrer dans le navigateur</string>
|
||||
<string name="clientlocalload">Charger depuis le navigateur</string>
|
||||
<string name="clientlocallist">Lister depuis le navigateur</string>
|
||||
<string name="clientsql">Génerer SQL</string>
|
||||
<string name="backendlabel">Méthode du serveur :</string>
|
||||
<string name="serversave">Enregistrer</string>
|
||||
<string name="quicksave">Enregistrer rapidement</string>
|
||||
<string name="serverload">Charger</string>
|
||||
<string name="serverlist">Éléments disponibles</string>
|
||||
<string name="serverimport">Importer d'une base de données</string>
|
||||
<string name="serverloadprompt">Saisir le mot-clé de votre schéma :</string>
|
||||
<string name="serversaveprompt">Saisir un mot-clé pour sauvegarder votre schéma :</string>
|
||||
<string name="serverimportprompt">Saisir le nom de la base de données à importer :</string>
|
||||
<string name="httpresponse">Réponse du serveur</string>
|
||||
<string name="http201">Sauvegardé</string>
|
||||
<string name="http404">Introuvable</string>
|
||||
<string name="http500">Erreur interne du serveur</string>
|
||||
<string name="http501">Non Implementé</string>
|
||||
<string name="http503">Service indisponible</string>
|
||||
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">Erreur XML</string>
|
||||
<string name="docs">Documentation</string>
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">Erreur XML</string>
|
||||
<string name="docs">Documentation</string>
|
||||
|
||||
</locale>
|
||||
|
||||
@@ -1,94 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Tábla létrehozása</string>
|
||||
<string name="edittable">Tábla módosítása</string>
|
||||
<string name="removetable">Tábla törlése</string>
|
||||
<string name="removetables">Táblak törlése</string>
|
||||
<string name="aligntables">Táblák rendezése</string>
|
||||
<string name="cleartables">Táblák törlése</string>
|
||||
<string name="confirmall">Valóban töröljem az összes táblát</string>
|
||||
<string name="newtable">tábla létrehozása</string>
|
||||
<string name="addpending">tábla elhelyezése</string>
|
||||
<string name="tablenamelabel">Név</string>
|
||||
<string name="tablecommentlabel">Megjegyzés</string>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Tábla létrehozása</string>
|
||||
<string name="edittable">Tábla módosítása</string>
|
||||
<string name="removetable">Tábla törlése</string>
|
||||
<string name="removetables">Táblak törlése</string>
|
||||
<string name="aligntables">Táblák rendezése</string>
|
||||
<string name="cleartables">Táblák törlése</string>
|
||||
<string name="confirmall">Valóban töröljem az összes táblát</string>
|
||||
<string name="newtable">tábla létrehozása</string>
|
||||
<string name="addpending">tábla elhelyezése</string>
|
||||
<string name="tablenamelabel">Név</string>
|
||||
<string name="tablecommentlabel">Megjegyzés</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">Mező létrehozása</string>
|
||||
<string name="editrow">Mező módosítása</string>
|
||||
<string name="removerow">Mező törlése</string>
|
||||
<string name="uprow">Fel</string>
|
||||
<string name="downrow">Le</string>
|
||||
<string name="newrow">új mező</string>
|
||||
<string name="foreigncreate">Idegen kulcs létrehozása</string>
|
||||
<string name="foreignpending">kattintson a cél-táblára</string>
|
||||
<string name="foreignconnect">Idegen kulcs kapcsolása</string>
|
||||
<string name="foreignconnectpending">kattintson a cél-mezőre</string>
|
||||
<string name="foreigndisconnect">Mező kulcs létrehozása</string>
|
||||
<string name="confirmtable">Valóban töröljem a táblát</string>
|
||||
<string name="confirmrow">Valóban töröljem a mezőt</string>
|
||||
<!-- row management -->
|
||||
<string name="addrow">Mező létrehozása</string>
|
||||
<string name="editrow">Mező módosítása</string>
|
||||
<string name="removerow">Mező törlése</string>
|
||||
<string name="uprow">Fel</string>
|
||||
<string name="downrow">Le</string>
|
||||
<string name="newrow">új mező</string>
|
||||
<string name="foreigncreate">Idegen kulcs létrehozása</string>
|
||||
<string name="foreignpending">kattintson a cél-táblára</string>
|
||||
<string name="foreignconnect">Idegen kulcs kapcsolása</string>
|
||||
<string name="foreignconnectpending">kattintson a cél-mezőre</string>
|
||||
<string name="foreigndisconnect">Mező kulcs létrehozása</string>
|
||||
<string name="confirmtable">Valóban töröljem a táblát</string>
|
||||
<string name="confirmrow">Valóban töröljem a mezőt</string>
|
||||
|
||||
<!-- row edit -->
|
||||
<string name="name">Név</string>
|
||||
<string name="type">Típus</string>
|
||||
<string name="size">Méret</string>
|
||||
<string name="def">Alapérték</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Automatikus növelés</string>
|
||||
<string name="comment">Megjegyzés módosítása</string>
|
||||
<string name="commenttext">Írjon megjegyzést ehhez a mezőhöz</string>
|
||||
<!-- row edit -->
|
||||
<string name="name">Név</string>
|
||||
<string name="type">Típus</string>
|
||||
<string name="size">Méret</string>
|
||||
<string name="def">Alapérték</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Automatikus növelés</string>
|
||||
<string name="comment">Megjegyzés módosítása</string>
|
||||
<string name="commenttext">Írjon megjegyzést ehhez a mezőhöz</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Mégsem</string>
|
||||
<string name="throbber">Kérem várjon...</string>
|
||||
<string name="options">Beállítások</string>
|
||||
<string name="language">Nyelv</string>
|
||||
<string name="db">Adatbázis az új terveknek</string>
|
||||
<string name="optionsnotice">Egyes beállítások csak az oldal teljes újratöltése után érvényesülnek. A munkához szükséges engedélyezni a sütiket (cooky-kat).</string>
|
||||
<string name="snap">Táblák illesztési távolsága</string>
|
||||
<string name="optionsnapnotice">Pixel-ben megadva, 0 = illesztés tiltása</string>
|
||||
<string name="pattern">Idegen nevek sablonja</string>
|
||||
<string name="optionpatternnotice">%T = elsődleges tábla, %R = elsődleges kulcs, %t = idegen tábla</string>
|
||||
<string name="hide">Elrejtsem a kapcsolókat a rajztáblán?</string>
|
||||
<string name="vector">Kapcsolók finom kirajzolása (ha a böngésző lehetővé teszi)?</string>
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Mégsem</string>
|
||||
<string name="throbber">Kérem várjon...</string>
|
||||
<string name="options">Beállítások</string>
|
||||
<string name="language">Nyelv</string>
|
||||
<string name="db">Adatbázis az új terveknek</string>
|
||||
<string name="optionsnotice">Egyes beállítások csak az oldal teljes újratöltése után érvényesülnek. A munkához szükséges engedélyezni a sütiket (cooky-kat).</string>
|
||||
<string name="snap">Táblák illesztési távolsága</string>
|
||||
<string name="optionsnapnotice">Pixel-ben megadva, 0 = illesztés tiltása</string>
|
||||
<string name="pattern">Idegen nevek sablonja</string>
|
||||
<string name="optionpatternnotice">%T = elsődleges tábla, %R = elsődleges kulcs, %t = idegen tábla</string>
|
||||
<string name="hide">Elrejtsem a kapcsolókat a rajztáblán?</string>
|
||||
<string name="vector">Kapcsolók finom kirajzolása (ha a böngésző lehetővé teszi)?</string>
|
||||
<string name="style">Stílus</string>
|
||||
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Kulcsok</string>
|
||||
<string name="keyslistlabel">Kulcsok a "%s" táblában</string>
|
||||
<string name="keytypelabel">Típus:</string>
|
||||
<string name="keynamelabel">Név:</string>
|
||||
<string name="keyfieldslabel">A kulcs mezői</string>
|
||||
<string name="keyavaillabel">Elérhető mezők</string>
|
||||
<string name="keyedit">Kulcs módosítása</string>
|
||||
<string name="keyadd">Kulcs létrehozása</string>
|
||||
<string name="keyremove">Kulcs törlése</string>
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Kulcsok</string>
|
||||
<string name="keyslistlabel">Kulcsok a "%s" táblában</string>
|
||||
<string name="keytypelabel">Típus:</string>
|
||||
<string name="keynamelabel">Név:</string>
|
||||
<string name="keyfieldslabel">A kulcs mezői</string>
|
||||
<string name="keyavaillabel">Elérhető mezők</string>
|
||||
<string name="keyedit">Kulcs módosítása</string>
|
||||
<string name="keyadd">Kulcs létrehozása</string>
|
||||
<string name="keyremove">Kulcs törlése</string>
|
||||
|
||||
<!-- io -->
|
||||
<string name="saveload">Mentés / Beolvasás</string>
|
||||
<string name="empty">Kérem illessze be az XML-tartalmat az alábbi szöveges mezőbe, és próbálja újra.</string>
|
||||
<string name="clientsave">XML mentése</string>
|
||||
<string name="clientload">XML beolvasása</string>
|
||||
<string name="clientsql">SQL generálása</string>
|
||||
<string name="backendlabel">Szerver végpont:</string>
|
||||
<string name="serversave">Mentés</string>
|
||||
<string name="serverload">Betöltés</string>
|
||||
<string name="serverlist">Tételek listázása</string>
|
||||
<string name="serverimport">Importálás adatbázisból</string>
|
||||
<string name="serverloadprompt">Írja be a kulcsszót, amely alapján a tervet elmentette:</string>
|
||||
<string name="serversaveprompt">Írja be a kulcsszót, amely alapján a tervet el szeretné menteni:</string>
|
||||
<string name="serverimportprompt">Írja be az importálandó adatbázis nevét:</string>
|
||||
<string name="httpresponse">A szerver válasza</string>
|
||||
<string name="http201">Elmentve</string>
|
||||
<string name="http404">Nem találom</string>
|
||||
<string name="http500">Belső szerver hiba</string>
|
||||
<string name="http501">Nem lett végrehajtva</string>
|
||||
<string name="http503">Szolgáltatás nem elérhető</string>
|
||||
<!-- io -->
|
||||
<string name="saveload">Mentés / Beolvasás</string>
|
||||
<string name="empty">Kérem illessze be az XML-tartalmat az alábbi szöveges mezőbe, és próbálja újra.</string>
|
||||
<string name="client">Kliens</string>
|
||||
<string name="server">Szerver</string>
|
||||
<string name="output">Bemenet / Kimenet</string>
|
||||
<string name="clientsave">XML mentése</string>
|
||||
<string name="clientload">XML beolvasása</string>
|
||||
<string name="clientsql">SQL generálása</string>
|
||||
<string name="backendlabel">Szerver végpont:</string>
|
||||
<string name="serversave">Mentés</string>
|
||||
<string name="serverload">Betöltés</string>
|
||||
<string name="serverlist">Tételek listázása</string>
|
||||
<string name="serverimport">Importálás adatbázisból</string>
|
||||
<string name="serverloadprompt">Írja be a kulcsszót, amely alapján a tervet elmentette:</string>
|
||||
<string name="serversaveprompt">Írja be a kulcsszót, amely alapján a tervet el szeretné menteni:</string>
|
||||
<string name="serverimportprompt">Írja be az importálandó adatbázis nevét:</string>
|
||||
<string name="httpresponse">A szerver válasza</string>
|
||||
<string name="http201">Elmentve</string>
|
||||
<string name="http404">Nem találom</string>
|
||||
<string name="http500">Belső szerver hiba</string>
|
||||
<string name="http501">Nem lett végrehajtva</string>
|
||||
<string name="http503">Szolgáltatás nem elérhető</string>
|
||||
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XML hiba</string>
|
||||
<string name="docs">Dokumentáció</string>
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XML hiba</string>
|
||||
<string name="docs">Dokumentáció</string>
|
||||
|
||||
</locale>
|
||||
|
||||
@@ -1,96 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Aggiungi tabella</string>
|
||||
<string name="edittable">Modifica tabella</string>
|
||||
<string name="removetable">Elimina tabella</string>
|
||||
<string name="removetables">Elimina tabelle</string>
|
||||
<string name="aligntables">Allinea tabelle</string>
|
||||
<string name="cleartables">Cancella tabelle</string>
|
||||
<string name="confirmall">Eliminare veramente le tabelle</string>
|
||||
<string name="newtable">nuova tabella</string>
|
||||
<string name="addpending">posiziona la tabella</string>
|
||||
<string name="tablenamelabel">Nome</string>
|
||||
<string name="tablecommentlabel">Oggetto</string>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Aggiungi tabella</string>
|
||||
<string name="edittable">Modifica tabella</string>
|
||||
<string name="removetable">Elimina tabella</string>
|
||||
<string name="removetables">Elimina tabelle</string>
|
||||
<string name="aligntables">Allinea tabelle</string>
|
||||
<string name="cleartables">Cancella tabelle</string>
|
||||
<string name="confirmall">Eliminare veramente le tabelle</string>
|
||||
<string name="newtable">nuova tabella</string>
|
||||
<string name="addpending">posiziona la tabella</string>
|
||||
<string name="tablenamelabel">Nome</string>
|
||||
<string name="tablecommentlabel">Oggetto</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">Aggiungi campo</string>
|
||||
<string name="editrow">Modifica campo</string>
|
||||
<string name="removerow">Elimina campo</string>
|
||||
<string name="uprow">Su</string>
|
||||
<string name="downrow">Giù</string>
|
||||
<string name="newrow">nuovo campo</string>
|
||||
<string name="foreigncreate">Crea chiave esterna</string>
|
||||
<string name="foreignpending">fai clic sulla destinazione</string>
|
||||
<string name="foreignconnect">Connetti chiave esterna</string>
|
||||
<string name="foreignconnectpending">fai clic sulla riga di destinazione</string>
|
||||
<string name="foreigndisconnect">Rimuovi chiave esterna</string>
|
||||
<string name="confirmtable">Cancellare veramente la tabella</string>
|
||||
<string name="confirmrow">Cancellare veramente la riga</string>
|
||||
<!-- row management -->
|
||||
<string name="addrow">Aggiungi campo</string>
|
||||
<string name="editrow">Modifica campo</string>
|
||||
<string name="removerow">Elimina campo</string>
|
||||
<string name="uprow">Su</string>
|
||||
<string name="downrow">Giù</string>
|
||||
<string name="newrow">nuovo campo</string>
|
||||
<string name="foreigncreate">Crea chiave esterna</string>
|
||||
<string name="foreignpending">fai clic sulla destinazione</string>
|
||||
<string name="foreignconnect">Connetti chiave esterna</string>
|
||||
<string name="foreignconnectpending">fai clic sulla riga di destinazione</string>
|
||||
<string name="foreigndisconnect">Rimuovi chiave esterna</string>
|
||||
<string name="confirmtable">Cancellare veramente la tabella</string>
|
||||
<string name="confirmrow">Cancellare veramente la riga</string>
|
||||
|
||||
<!-- row edit -->
|
||||
<string name="name">Nome</string>
|
||||
<string name="type">Tipo</string>
|
||||
<string name="size">Dimensione</string>
|
||||
<string name="def">Predefinito</string>
|
||||
<string name="notnull">QUALCOSA</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Autoincremento</string>
|
||||
<string name="comment">Modifica commento</string>
|
||||
<string name="commenttext">Inserisci commento per questo campo</string>
|
||||
<!-- row edit -->
|
||||
<string name="name">Nome</string>
|
||||
<string name="type">Tipo</string>
|
||||
<string name="size">Dimensione</string>
|
||||
<string name="def">Predefinito</string>
|
||||
<string name="notnull">QUALCOSA</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Autoincremento</string>
|
||||
<string name="comment">Modifica commento</string>
|
||||
<string name="commenttext">Inserisci commento per questo campo</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">Conferma</string>
|
||||
<string name="windowcancel">Annulla</string>
|
||||
<string name="throbber">Attendere...</string>
|
||||
<string name="options">Opzioni</string>
|
||||
<string name="language">Lingua</string>
|
||||
<string name="db">Database per nuovi progetti</string>
|
||||
<string name="optionsnotice">Alcune opzioni diventano attive solo dopo il ricaricamento della pagina. Affinché le opzioni vengano mantenute, devono essere abilitati i cookies.</string>
|
||||
<string name="snap">Griglia magnetica</string>
|
||||
<string name="optionsnapnotice">In pixel, 0 = magnetismo disabilitato</string>
|
||||
<string name="pattern">Modello per le chiavi esterne</string>
|
||||
<string name="optionpatternnotice">%T = tabella principale, %R = chiave primaria, %t = tabella secondaria</string>
|
||||
<string name="hide">Nascondi i connettori durante il trascinamento?</string>
|
||||
<string name="vector">Disegna connettori arrotondati (se supportato dal browser)?</string>
|
||||
<string name="showsize">Show field size in table design?</string>
|
||||
<string name="showtype">Show field datatype in table design?</string>
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">Conferma</string>
|
||||
<string name="windowcancel">Annulla</string>
|
||||
<string name="throbber">Attendere...</string>
|
||||
<string name="options">Opzioni</string>
|
||||
<string name="language">Lingua</string>
|
||||
<string name="db">Database per nuovi progetti</string>
|
||||
<string name="optionsnotice">Alcune opzioni diventano attive solo dopo il ricaricamento della pagina. Affinché le opzioni vengano mantenute, devono essere abilitati i cookies.</string>
|
||||
<string name="snap">Griglia magnetica</string>
|
||||
<string name="optionsnapnotice">In pixel, 0 = magnetismo disabilitato</string>
|
||||
<string name="pattern">Modello per le chiavi esterne</string>
|
||||
<string name="optionpatternnotice">%T = tabella principale, %R = chiave primaria, %t = tabella secondaria</string>
|
||||
<string name="hide">Nascondi i connettori durante il trascinamento?</string>
|
||||
<string name="vector">Disegna connettori arrotondati (se supportato dal browser)?</string>
|
||||
<string name="showsize">Show field size in table design?</string>
|
||||
<string name="showtype">Show field datatype in table design?</string>
|
||||
<string name="style">Stile</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Chiavi</string>
|
||||
<string name="keyslistlabel">Chiavi nella tabella "%s"</string>
|
||||
<string name="keytypelabel">Tipo:</string>
|
||||
<string name="keynamelabel">Nome:</string>
|
||||
<string name="keyfieldslabel">Campi nella chiave</string>
|
||||
<string name="keyavaillabel">Campi disponibili</string>
|
||||
<string name="keyedit">Modifica chiave</string>
|
||||
<string name="keyadd">Aggiungi chiave</string>
|
||||
<string name="keyremove">Rimuovi chiave</string>
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Chiavi</string>
|
||||
<string name="keyslistlabel">Chiavi nella tabella "%s"</string>
|
||||
<string name="keytypelabel">Tipo:</string>
|
||||
<string name="keynamelabel">Nome:</string>
|
||||
<string name="keyfieldslabel">Campi nella chiave</string>
|
||||
<string name="keyavaillabel">Campi disponibili</string>
|
||||
<string name="keyedit">Modifica chiave</string>
|
||||
<string name="keyadd">Aggiungi chiave</string>
|
||||
<string name="keyremove">Rimuovi chiave</string>
|
||||
|
||||
<!-- io -->
|
||||
<string name="saveload">Salva / Carica</string>
|
||||
<string name="empty">Reincolla i dati XML nell'area sottostante e prova di nuovo.</string>
|
||||
<string name="clientsave">Salva XML</string>
|
||||
<string name="clientload">Carica XML</string>
|
||||
<string name="clientsql">Genera SQL</string>
|
||||
<string name="backendlabel">Server di backend:</string>
|
||||
<string name="serversave">Salva</string>
|
||||
<string name="quicksave">Quicksave</string>
|
||||
<string name="serverload">Carica</string>
|
||||
<string name="serverlist">Elenca elementi</string>
|
||||
<string name="serverimport">Importa dal DB</string>
|
||||
<string name="serverloadprompt">Inserisci la parola chiave con cui è stato salvato il progetto:</string>
|
||||
<string name="serversaveprompt">Inserisci la parola chiave con cui salvare il progetto:</string>
|
||||
<string name="serverimportprompt">Inserisci il nome del database da importare</string>
|
||||
<string name="httpresponse">Risposta del server</string>
|
||||
<string name="http201">Salvato</string>
|
||||
<string name="http404">Non trovato</string>
|
||||
<string name="http500">Errore interno del server</string>
|
||||
<string name="http501">Non implementato</string>
|
||||
<string name="http503">Servizio non disponibile</string>
|
||||
<!-- io -->
|
||||
<string name="saveload">Salva / Carica</string>
|
||||
<string name="empty">Reincolla i dati XML nell'area sottostante e prova di nuovo.</string>
|
||||
<string name="client">Intestatario</string>
|
||||
<string name="server">Server</string>
|
||||
<string name="output">Ingresso / Uscita</string>
|
||||
<string name="clientsave">Salva XML</string>
|
||||
<string name="clientload">Carica XML</string>
|
||||
<string name="clientsql">Genera SQL</string>
|
||||
<string name="backendlabel">Server di backend:</string>
|
||||
<string name="serversave">Salva</string>
|
||||
<string name="quicksave">Quicksave</string>
|
||||
<string name="serverload">Carica</string>
|
||||
<string name="serverlist">Elenca elementi</string>
|
||||
<string name="serverimport">Importa dal DB</string>
|
||||
<string name="serverloadprompt">Inserisci la parola chiave con cui è stato salvato il progetto:</string>
|
||||
<string name="serversaveprompt">Inserisci la parola chiave con cui salvare il progetto:</string>
|
||||
<string name="serverimportprompt">Inserisci il nome del database da importare</string>
|
||||
<string name="httpresponse">Risposta del server</string>
|
||||
<string name="http201">Salvato</string>
|
||||
<string name="http404">Non trovato</string>
|
||||
<string name="http500">Errore interno del server</string>
|
||||
<string name="http501">Non implementato</string>
|
||||
<string name="http503">Servizio non disponibile</string>
|
||||
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">Errore XML</string>
|
||||
<string name="docs">Documentazione</string>
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">Errore XML</string>
|
||||
<string name="docs">Documentazione</string>
|
||||
|
||||
</locale>
|
||||
|
||||
@@ -1,93 +1,102 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- table management -->
|
||||
<string name="addtable">テーブルを追加</string>
|
||||
<string name="edittable">テーブルを編集</string>
|
||||
<string name="removetable">テーブルを削除</string>
|
||||
<string name="aligntables">テーブルを整列</string>
|
||||
<string name="cleartables">全テーブルを削除</string>
|
||||
<string name="confirmall">全テーブルを削除しますか</string>
|
||||
<string name="newtable">新規テーブル</string>
|
||||
<string name="addpending">テーブルを配置</string>
|
||||
<string name="tablenamelabel">テーブル名</string>
|
||||
<string name="tablecommentlabel">コメント</string>
|
||||
<!-- table management -->
|
||||
<string name="addtable">テーブルを追加</string>
|
||||
<string name="edittable">テーブルを編集</string>
|
||||
<string name="removetable">テーブルを削除</string>
|
||||
<string name="aligntables">テーブルを整列</string>
|
||||
<string name="cleartables">全テーブルを削除</string>
|
||||
<string name="confirmall">全テーブルを削除しますか</string>
|
||||
<string name="newtable">新規テーブル</string>
|
||||
<string name="addpending">テーブルを配置</string>
|
||||
<string name="tablenamelabel">テーブル名</string>
|
||||
<string name="tablecommentlabel">コメント</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">列を追加</string>
|
||||
<string name="editrow">列を編集</string>
|
||||
<string name="removerow">列を削除</string>
|
||||
<string name="uprow">上に</string>
|
||||
<string name="downrow">下に</string>
|
||||
<string name="newrow">新規列</string>
|
||||
<string name="foreigncreate">外部キーとして移動</string>
|
||||
<string name="foreignpending">対象テーブルを選択</string>
|
||||
<string name="foreignconnect">外部キーを接続</string>
|
||||
<string name="foreignconnectpending">対象列を選択</string>
|
||||
<string name="foreigndisconnect">外部キーを削除</string>
|
||||
<string name="confirmtable">テーブルを削除しますか</string>
|
||||
<string name="confirmrow">列を削除しますか</string>
|
||||
<!-- row management -->
|
||||
<string name="addrow">列を追加</string>
|
||||
<string name="editrow">列を編集</string>
|
||||
<string name="removerow">列を削除</string>
|
||||
<string name="uprow">上に</string>
|
||||
<string name="downrow">下に</string>
|
||||
<string name="newrow">新規列</string>
|
||||
<string name="foreigncreate">外部キーとして移動</string>
|
||||
<string name="foreignpending">対象テーブルを選択</string>
|
||||
<string name="foreignconnect">外部キーを接続</string>
|
||||
<string name="foreignconnectpending">対象列を選択</string>
|
||||
<string name="foreigndisconnect">外部キーを削除</string>
|
||||
<string name="confirmtable">テーブルを削除しますか</string>
|
||||
<string name="confirmrow">列を削除しますか</string>
|
||||
|
||||
<!-- row edit -->
|
||||
<string name="name">列名</string>
|
||||
<string name="type">型</string>
|
||||
<string name="size">サイズ</string>
|
||||
<string name="def">デフォルト値</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">自動採番</string>
|
||||
<string name="comment">コメントを編集</string>
|
||||
<string name="commenttext">列のコメントを入力</string>
|
||||
<!-- row edit -->
|
||||
<string name="name">列名</string>
|
||||
<string name="type">型</string>
|
||||
<string name="size">サイズ</string>
|
||||
<string name="def">デフォルト値</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">自動採番</string>
|
||||
<string name="comment">コメントを編集</string>
|
||||
<string name="commenttext">列のコメントを入力</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">キャンセル</string>
|
||||
<string name="throbber">しばらくお待ちください...</string>
|
||||
<string name="options">オプション</string>
|
||||
<string name="language">言語</string>
|
||||
<string name="db">新しい設計で使用するデータベース</string>
|
||||
<string name="optionsnotice">印は再読込後に反映されるオプションです。これらを動作させるにはクッキーを有効にしてください。</string>
|
||||
<string name="snap">テーブルのスナップ単位</string>
|
||||
<string name="optionsnapnotice">ピクセル(0 = スナップ無効)</string>
|
||||
<string name="pattern">外部キーの命名規則</string>
|
||||
<string name="optionpatternnotice">%T = 親テーブル, %R = プライマリーキー, %t = 子テーブル</string>
|
||||
<string name="hide">テーブルをドラッグ中は線を隠す</string>
|
||||
<string name="vector">滑らかな線を使う(要ブラウザのサポート)</string>
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">キャンセル</string>
|
||||
<string name="throbber">しばらくお待ちください...</string>
|
||||
<string name="options">オプション</string>
|
||||
<string name="language">言語</string>
|
||||
<string name="db">新しい設計で使用するデータベース</string>
|
||||
<string name="optionsnotice">印は再読込後に反映されるオプションです。これらを動作させるにはクッキーを有効にしてください。</string>
|
||||
<string name="snap">テーブルのスナップ単位</string>
|
||||
<string name="optionsnapnotice">ピクセル(0 = スナップ無効)</string>
|
||||
<string name="pattern">外部キーの命名規則</string>
|
||||
<string name="optionpatternnotice">%T = 親テーブル, %R = プライマリーキー, %t = 子テーブル</string>
|
||||
<string name="hide">テーブルをドラッグ中は線を隠す</string>
|
||||
<string name="vector">滑らかな線を使う(要ブラウザのサポート)</string>
|
||||
<string name="showsize">フィールドサイズを表示</string>
|
||||
<string name="showtype">フィールドタイプを表示</string>
|
||||
<string name="style">スタイル</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">キーの設定</string>
|
||||
<string name="keyslistlabel">テーブル"%s"のキー</string>
|
||||
<string name="keytypelabel">種類:</string>
|
||||
<string name="keynamelabel">キー名:</string>
|
||||
<string name="keyfieldslabel">キーの対象列</string>
|
||||
<string name="keyavaillabel">選択可能な列</string>
|
||||
<string name="keyedit">キーを編集</string>
|
||||
<string name="keyadd">キーを追加</string>
|
||||
<string name="keyremove">キーを削除</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">キーの設定</string>
|
||||
<string name="keyslistlabel">テーブル"%s"のキー</string>
|
||||
<string name="keytypelabel">種類:</string>
|
||||
<string name="keynamelabel">キー名:</string>
|
||||
<string name="keyfieldslabel">キーの対象列</string>
|
||||
<string name="keyavaillabel">選択可能な列</string>
|
||||
<string name="keyedit">キーを編集</string>
|
||||
<string name="keyadd">キーを追加</string>
|
||||
<string name="keyremove">キーを削除</string>
|
||||
<!-- io -->
|
||||
<string name="saveload">保存/読み込み</string>
|
||||
<string name="empty">下の入出力欄にXMLデータを貼りつけてから実行してください。</string>
|
||||
<string name="client">クライアント</string>
|
||||
<string name="server">サーバ</string>
|
||||
<string name="output">入出力欄</string>
|
||||
<string name="clientsave">XMLを出力</string>
|
||||
<string name="clientload">XMLを読込</string>
|
||||
<string name="clientsql">SQLを生成</string>
|
||||
<string name="clientlocalsave">ブラウザに保存</string>
|
||||
<string name="clientlocalload">ブラウザから読込</string>
|
||||
<string name="clientlocallist">ブラウザの保存一覧</string>
|
||||
<string name="backendlabel">サーバのバックエンド:</string>
|
||||
<string name="serversave">保存</string>
|
||||
<string name="quicksave">Quicksave</string>
|
||||
<string name="serverload">読込</string>
|
||||
<string name="serverlist">一覧</string>
|
||||
<string name="serverimport">DBからインポート</string>
|
||||
<string name="serverloadprompt">読み込む設計名を入力してください:</string>
|
||||
<string name="serversaveprompt">保存する設計名を入力してください:</string>
|
||||
<string name="serverimportprompt">インポートするDB名を入力してください:</string>
|
||||
<string name="httpresponse">サーバレスポンス</string>
|
||||
<string name="http201">Saved</string>
|
||||
<string name="http404">Not Found</string>
|
||||
<string name="http500">Internal Server Error</string>
|
||||
<string name="http501">Not Implemented</string>
|
||||
<string name="http503">Service Unavailable</string>
|
||||
|
||||
<!-- io -->
|
||||
<string name="saveload">保存/読み込み</string>
|
||||
<string name="empty">下の入出力欄にXMLデータを貼りつけてから実行してください。</string>
|
||||
<string name="clientsave">XMLを出力</string>
|
||||
<string name="clientload">XMLを読込</string>
|
||||
<string name="clientsql">SQLを生成</string>
|
||||
<string name="backendlabel">サーバのバックエンド:</string>
|
||||
<string name="serversave">保存</string>
|
||||
<string name="serverload">読込</string>
|
||||
<string name="serverlist">一覧</string>
|
||||
<string name="serverimport">DBからインポート</string>
|
||||
<string name="serverloadprompt">読み込む設計名を入力してください:</string>
|
||||
<string name="serversaveprompt">保存する設計名を入力してください:</string>
|
||||
<string name="serverimportprompt">インポートするDB名を入力してください:</string>
|
||||
<string name="httpresponse">サーバレスポンス</string>
|
||||
<string name="http201">Saved</string>
|
||||
<string name="http404">Not Found</string>
|
||||
<string name="http500">Internal Server Error</string>
|
||||
<string name="http501">Not Implemented</string>
|
||||
<string name="http503">Service Unavailable</string>
|
||||
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XMLエラー</string>
|
||||
<string name="docs">ドキュメント</string>
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XMLエラー</string>
|
||||
<string name="docs">ドキュメント</string>
|
||||
|
||||
</locale>
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- table management -->
|
||||
<string name="addtable">테이블 추가</string>
|
||||
<string name="edittable">테이블 수정</string>
|
||||
<string name="removetable">테이블 삭제</string>
|
||||
<string name="removetables">선택한 테이블 삭제</string>
|
||||
<string name="aligntables">테이블 정렬</string>
|
||||
<string name="cleartables">전체 테이블 삭제</string>
|
||||
<string name="confirmall">정말로 전체 테이블을 삭제하시겠습니까</string>
|
||||
<string name="newtable">신규 테이블</string>
|
||||
<string name="addpending">테이블 놓기</string>
|
||||
<string name="tablenamelabel">이름</string>
|
||||
<string name="tablecommentlabel">설명</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">필드 추가</string>
|
||||
<string name="editrow">필드 수정</string>
|
||||
<string name="removerow">필드 삭제</string>
|
||||
<string name="uprow">위로</string>
|
||||
<string name="downrow">아래로</string>
|
||||
<string name="newrow">신규 필드</string>
|
||||
<string name="foreigncreate">외래 키 생성</string>
|
||||
<string name="foreignpending">대상 테이블 선택</string>
|
||||
<string name="foreignconnect">외래 키 연결</string>
|
||||
<string name="foreignconnectpending">대상 필드 선택</string>
|
||||
<string name="foreigndisconnect">외래 키 삭제</string>
|
||||
<string name="confirmtable">정말로 테이블을 삭제하시겠습니까</string>
|
||||
<string name="confirmrow">정말로 필드를 삭제하시겠습니까</string>
|
||||
|
||||
<!-- row edit -->
|
||||
<string name="name">이름</string>
|
||||
<string name="type">타입</string>
|
||||
<string name="size">사이즈</string>
|
||||
<string name="def">기본값</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">자동 증가</string>
|
||||
<string name="comment">설명 수정</string>
|
||||
<string name="commenttext">이 필드의 설명을 입력해 주세요</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">확인</string>
|
||||
<string name="windowcancel">취소</string>
|
||||
<string name="throbber">잠시만 기다려주세요...</string>
|
||||
<string name="options">옵션</string>
|
||||
<string name="language">언어</string>
|
||||
<string name="db">새로운 디자인의 데이터베이스</string>
|
||||
<string name="optionsnotice">몇몇 옵션들은 페이지를 다시 불러와야 적용이 됩니다. 이를 위해서는 쿠키 사용이 활성화 되어 있어야 합니다.</string>
|
||||
<string name="snap">테이블 스냅 거리</string>
|
||||
<string name="optionsnapnotice">픽셀, 0 = 스냅 비활성화</string>
|
||||
<string name="pattern">외래 키 명명 규식</string>
|
||||
<string name="optionpatternnotice">%T = 기본 테이블, %R = 기본 키, %t = 외래 테이블</string>
|
||||
<string name="hide">테이블을 이동할 때, 연결선 숨기기</string>
|
||||
<string name="vector">부드러운 연결선 사용 (브라우저 지원 필요)?</string>
|
||||
<string name="showsize">디자인에서 필드 사이즈를 표시</string>
|
||||
<string name="showtype">디자인에서 필드 타입을 표시</string>
|
||||
<string name="style">스타일</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">키 설정</string>
|
||||
<string name="keyslistlabel">"%s" 테이블 키 정보</string>
|
||||
<string name="keytypelabel">타입:</string>
|
||||
<string name="keynamelabel">이름:</string>
|
||||
<string name="keyfieldslabel">키 필드</string>
|
||||
<string name="keyavaillabel">추가 가능한 필드</string>
|
||||
<string name="keyedit">키 수정</string>
|
||||
<string name="keyadd">키 추가</string>
|
||||
<string name="keyremove">키 삭제</string>
|
||||
|
||||
<!-- io -->
|
||||
<string name="saveload">저장 / 불러오기</string>
|
||||
<string name="empty">불러오려고 하는 XML 데이터를 아래 텍스트 영역에 붙여 넣고 다시 시도해 주세요.</string>
|
||||
<string name="client">클라이언트</string>
|
||||
<string name="server">서버</string>
|
||||
<string name="output">입력 / 출력</string>
|
||||
<string name="clientsave">XML 저장</string>
|
||||
<string name="clientload">XML 불러오기</string>
|
||||
<string name="clientlocalsave">브라우저에 저장</string>
|
||||
<string name="clientlocalload">브라우저에서 불러오기</string>
|
||||
<string name="clientlocallist">브라우저 저장 목록</string>
|
||||
<string name="dropboxsave">드롭박스에 저장</string>
|
||||
<string name="dropboxload">드롭박스에서 불러오기</string>
|
||||
<string name="dropboxlist">드롭박스 저장 목록</string>
|
||||
<string name="clientsql">SQL 생성</string>
|
||||
<string name="backendlabel">벡엔드 서버:</string>
|
||||
<string name="serversave">저장</string>
|
||||
<string name="quicksave">빠른저장</string>
|
||||
<string name="serverload">불러오기</string>
|
||||
<string name="serverlist">목록보기</string>
|
||||
<string name="serverimport">DB에서 가져오기</string>
|
||||
<string name="serverloadprompt">저장된 디자인의 키워드를 입력해 주세요:</string>
|
||||
<string name="serversaveprompt">저장할 디자인의 키워드를 입력해 주세요:</string>
|
||||
<string name="serverimportprompt">가져올 데이터베이스의 이름을 입력해 주세요:</string>
|
||||
<string name="httpresponse">서버 응답</string>
|
||||
<string name="http201">저장되었습니다</string>
|
||||
<string name="http404">찾을 수 없습니다(Not Found)</string>
|
||||
<string name="http500">내부 서버 에러(Internal Server Error)</string>
|
||||
<string name="http501">구현되지 않았습니다(Not Implemented)</string>
|
||||
<string name="http503">서비스를 사용할 수 없습니다(Service Unavailable)</string>
|
||||
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XML 에러</string>
|
||||
<string name="docs">문서</string>
|
||||
|
||||
</locale>
|
||||
@@ -1,98 +1,102 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Tabel toevoegen</string>
|
||||
<string name="edittable">Bewerk tabel</string>
|
||||
<string name="removetable">Verwijder tabel</string>
|
||||
<string name="removetables">Verwijder tabellen</string>
|
||||
<string name="aligntables">Uitlijnen tabellen</string>
|
||||
<string name="cleartables">Tabellen schonen</string>
|
||||
<string name="confirmall">Wilt u echt alle tabellen verwijderen</string>
|
||||
<string name="newtable">Nieuwe tabel</string>
|
||||
<string name="addpending">Positioneer tabel</string>
|
||||
<string name="tablenamelabel">Naam</string>
|
||||
<string name="tablecommentlabel">Opmerkingen</string>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Tabel toevoegen</string>
|
||||
<string name="edittable">Bewerk tabel</string>
|
||||
<string name="removetable">Verwijder tabel</string>
|
||||
<string name="removetables">Verwijder tabellen</string>
|
||||
<string name="aligntables">Uitlijnen tabellen</string>
|
||||
<string name="cleartables">Tabellen schonen</string>
|
||||
<string name="confirmall">Wilt u echt alle tabellen verwijderen</string>
|
||||
<string name="newtable">Nieuwe tabel</string>
|
||||
<string name="addpending">Positioneer tabel</string>
|
||||
<string name="tablenamelabel">Naam</string>
|
||||
<string name="tablecommentlabel">Opmerkingen</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">Veld toevoegen</string>
|
||||
<string name="editrow">Veld bewerken</string>
|
||||
<string name="removerow">Veld verwijderen</string>
|
||||
<string name="uprow">Op</string>
|
||||
<string name="downrow">Neer</string>
|
||||
<string name="newrow">nieuwe veld</string>
|
||||
<string name="foreigncreate">Maak relatie</string>
|
||||
<string name="foreignpending">Click op doeltabel</string>
|
||||
<string name="foreignconnect">Verbind relatie</string>
|
||||
<string name="foreignconnectpending">Click op doelveld</string>
|
||||
<string name="foreigndisconnect">Verwijder relatie</string>
|
||||
<string name="confirmtable">Tabel verwijderen?</string>
|
||||
<string name="confirmrow">Veld verwijderen?</string>
|
||||
<!-- row management -->
|
||||
<string name="addrow">Veld toevoegen</string>
|
||||
<string name="editrow">Veld bewerken</string>
|
||||
<string name="removerow">Veld verwijderen</string>
|
||||
<string name="uprow">Op</string>
|
||||
<string name="downrow">Neer</string>
|
||||
<string name="newrow">nieuwe veld</string>
|
||||
<string name="foreigncreate">Maak relatie</string>
|
||||
<string name="foreignpending">Click op doeltabel</string>
|
||||
<string name="foreignconnect">Verbind relatie</string>
|
||||
<string name="foreignconnectpending">Click op doelveld</string>
|
||||
<string name="foreigndisconnect">Verwijder relatie</string>
|
||||
<string name="confirmtable">Tabel verwijderen?</string>
|
||||
<string name="confirmrow">Veld verwijderen?</string>
|
||||
|
||||
<!-- row edit -->
|
||||
<string name="name">Naam</string>
|
||||
<string name="type">Type</string>
|
||||
<string name="size">Omvang</string>
|
||||
<string name="def">Standaard</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Autoincrement</string>
|
||||
<string name="comment">Bewerk opmerkingen</string>
|
||||
<string name="commenttext">Geef opmerkingen voor dit veld</string>
|
||||
<!-- row edit -->
|
||||
<string name="name">Naam</string>
|
||||
<string name="type">Type</string>
|
||||
<string name="size">Omvang</string>
|
||||
<string name="def">Standaard</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Autoincrement</string>
|
||||
<string name="comment">Bewerk opmerkingen</string>
|
||||
<string name="commenttext">Geef opmerkingen voor dit veld</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Annuleer</string>
|
||||
<string name="throbber">Even geduld...</string>
|
||||
<string name="options">Opties</string>
|
||||
<string name="language">Taal</string>
|
||||
<string name="db">Database voor nieuwe ontwerpen</string>
|
||||
<string name="optionsnotice">Sommige opties worden pas geldig na het volledig opnieuw laden van de pagina. Cookies moeten zijn toegestaan voor een juiste werking.</string>
|
||||
<string name="snap">Tabel snap afstand</string>
|
||||
<string name="optionsnapnotice">In pixels, 0 = uitzetten snap</string>
|
||||
<string name="pattern">Patroon voor relatie velden</string>
|
||||
<string name="optionpatternnotice">%T = primaire tabel, %R = primaire sleutel, %t = verwezen tabel.</string>
|
||||
<string name="hide">Verberg relaties tijdens verplaatsen van de tabel?</string>
|
||||
<string name="vector">Teken gekromde relaties (als de browser dit ondersteund)?</string>
|
||||
<string name="showsize">Toon veld omvang in tabelontwerp?</string>
|
||||
<string name="showtype">Toon veld type in tabelontwerp?</string>
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Annuleer</string>
|
||||
<string name="throbber">Even geduld...</string>
|
||||
<string name="options">Opties</string>
|
||||
<string name="language">Taal</string>
|
||||
<string name="db">Database voor nieuwe ontwerpen</string>
|
||||
<string name="optionsnotice">Sommige opties worden pas geldig na het volledig opnieuw laden van de pagina. Cookies moeten zijn toegestaan voor een juiste werking.</string>
|
||||
<string name="snap">Tabel snap afstand</string>
|
||||
<string name="optionsnapnotice">In pixels, 0 = uitzetten snap</string>
|
||||
<string name="pattern">Patroon voor relatie velden</string>
|
||||
<string name="optionpatternnotice">%T = primaire tabel, %R = primaire sleutel, %t = verwezen tabel.</string>
|
||||
<string name="hide">Verberg relaties tijdens verplaatsen van de tabel?</string>
|
||||
<string name="vector">Teken gekromde relaties (als de browser dit ondersteund)?</string>
|
||||
<string name="showsize">Toon veld omvang in tabelontwerp?</string>
|
||||
<string name="showtype">Toon veld type in tabelontwerp?</string>
|
||||
<string name="style">Stijl</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Sleutels</string>
|
||||
<string name="keyslistlabel">Sleutels in tabel "%s"</string>
|
||||
<string name="keytypelabel">Type:</string>
|
||||
<string name="keynamelabel">Naam:</string>
|
||||
<string name="keyfieldslabel">Velden in sleutel</string>
|
||||
<string name="keyavaillabel">Beschikbare velden</string>
|
||||
<string name="keyedit">Bewerk sleutel</string>
|
||||
<string name="keyadd">Voeg sleutel toe</string>
|
||||
<string name="keyremove">Verwijder sleutel</string>
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Sleutels</string>
|
||||
<string name="keyslistlabel">Sleutels in tabel "%s"</string>
|
||||
<string name="keytypelabel">Type:</string>
|
||||
<string name="keynamelabel">Naam:</string>
|
||||
<string name="keyfieldslabel">Velden in sleutel</string>
|
||||
<string name="keyavaillabel">Beschikbare velden</string>
|
||||
<string name="keyedit">Bewerk sleutel</string>
|
||||
<string name="keyadd">Voeg sleutel toe</string>
|
||||
<string name="keyremove">Verwijder sleutel</string>
|
||||
|
||||
<!-- io -->
|
||||
<string name="saveload">Opslaan / laden</string>
|
||||
<string name="empty">Please paste XML data into the text area below and try again.</string>
|
||||
<string name="clientsave">XML Opslaan</string>
|
||||
<string name="clientload">XML Laden</string>
|
||||
<string name="clientlocalsave">Opslaan in Browser</string>
|
||||
<string name="clientlocalload">Laden uit Browser</string>
|
||||
<string name="clientsql">Genereer SQL</string>
|
||||
<string name="backendlabel">Server:</string>
|
||||
<string name="serversave">Opslaan</string>
|
||||
<string name="quicksave">Snel opslaan</string>
|
||||
<string name="serverload">Laden</string>
|
||||
<string name="serverlist">Toon lijst</string>
|
||||
<string name="serverimport">Import uit DB</string>
|
||||
<string name="serverloadprompt">Enter keyword under which your design was saved:</string>
|
||||
<string name="serversaveprompt">Enter keyword under which your design will be saved:</string>
|
||||
<string name="serverimportprompt">Enter name of database to be imported:</string>
|
||||
<string name="httpresponse">Reactie van server</string>
|
||||
<string name="http201">Opgeslagen</string>
|
||||
<string name="http404">Niet gevonden</string>
|
||||
<string name="http500">Interne Server Fout</string>
|
||||
<string name="http501">Niet geimplementeerd</string>
|
||||
<string name="http503">Niet beschikbaar</string>
|
||||
<!-- io -->
|
||||
<string name="saveload">Opslaan / laden</string>
|
||||
<string name="empty">Please paste XML data into the text area below and try again.</string>
|
||||
<string name="client">Lokaal</string>
|
||||
<string name="server">Server</string>
|
||||
<string name="output">Input / Output</string>
|
||||
<string name="clientsave">XML Opslaan</string>
|
||||
<string name="clientload">XML Laden</string>
|
||||
<string name="clientlocalsave">Opslaan in Browser</string>
|
||||
<string name="clientlocalload">Laden uit Browser</string>
|
||||
<string name="clientsql">Genereer SQL</string>
|
||||
<string name="backendlabel">Server:</string>
|
||||
<string name="serversave">Opslaan</string>
|
||||
<string name="quicksave">Snel opslaan</string>
|
||||
<string name="serverload">Laden</string>
|
||||
<string name="serverlist">Toon lijst</string>
|
||||
<string name="serverimport">Import uit DB</string>
|
||||
<string name="serverloadprompt">Enter keyword under which your design was saved:</string>
|
||||
<string name="serversaveprompt">Enter keyword under which your design will be saved:</string>
|
||||
<string name="serverimportprompt">Enter name of database to be imported:</string>
|
||||
<string name="httpresponse">Reactie van server</string>
|
||||
<string name="http201">Opgeslagen</string>
|
||||
<string name="http404">Niet gevonden</string>
|
||||
<string name="http500">Interne Server Fout</string>
|
||||
<string name="http501">Niet geimplementeerd</string>
|
||||
<string name="http503">Niet beschikbaar</string>
|
||||
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XML fout</string>
|
||||
<string name="docs">Documentatie</string>
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XML fout</string>
|
||||
<string name="docs">Documentatie</string>
|
||||
|
||||
</locale>
|
||||
|
||||
@@ -1,96 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Dodaj tabelę</string>
|
||||
<string name="edittable">Edytuj tabelę</string>
|
||||
<string name="removetable">Usuń tabelę</string>
|
||||
<string name="removetables">Usuń tabele</string>
|
||||
<string name="aligntables">Wyrównaj tabele</string>
|
||||
<string name="cleartables">Wyczyść tabele</string>
|
||||
<string name="confirmall">Czy na pewno usunąć wszystkie tabele</string>
|
||||
<string name="newtable">nowa tabela</string>
|
||||
<string name="addpending">miejsce tabeli</string>
|
||||
<string name="tablenamelabel">Nazwa</string>
|
||||
<string name="tablecommentlabel">Opis</string>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Dodaj tabelę</string>
|
||||
<string name="edittable">Edytuj tabelę</string>
|
||||
<string name="removetable">Usuń tabelę</string>
|
||||
<string name="removetables">Usuń tabele</string>
|
||||
<string name="aligntables">Wyrównaj tabele</string>
|
||||
<string name="cleartables">Wyczyść tabele</string>
|
||||
<string name="confirmall">Czy na pewno usunąć wszystkie tabele</string>
|
||||
<string name="newtable">nowa tabela</string>
|
||||
<string name="addpending">miejsce tabeli</string>
|
||||
<string name="tablenamelabel">Nazwa</string>
|
||||
<string name="tablecommentlabel">Opis</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">Dodaj pole</string>
|
||||
<string name="editrow">Edytuj pole</string>
|
||||
<string name="removerow">Usuń pole</string>
|
||||
<string name="uprow">W górę</string>
|
||||
<string name="downrow">W dół</string>
|
||||
<string name="newrow">nowe pole</string>
|
||||
<string name="foreigncreate">Utwórz klucz zewnętrzny</string>
|
||||
<string name="foreignpending">kliknij w docelową tabelę</string>
|
||||
<string name="foreignconnect">Utwórz klucz zewnętrzny</string>
|
||||
<string name="foreignconnectpending">kliknij w docelową tabelę</string>
|
||||
<string name="foreigndisconnect">Smazat cizí klíč</string>
|
||||
<string name="confirmtable">Czy na pewno usunąć tabelę</string>
|
||||
<string name="confirmrow">Czy na pewno usunąć pole</string>
|
||||
<!-- row management -->
|
||||
<string name="addrow">Dodaj pole</string>
|
||||
<string name="editrow">Edytuj pole</string>
|
||||
<string name="removerow">Usuń pole</string>
|
||||
<string name="uprow">W górę</string>
|
||||
<string name="downrow">W dół</string>
|
||||
<string name="newrow">nowe pole</string>
|
||||
<string name="foreigncreate">Utwórz klucz zewnętrzny</string>
|
||||
<string name="foreignpending">kliknij w docelową tabelę</string>
|
||||
<string name="foreignconnect">Utwórz klucz zewnętrzny</string>
|
||||
<string name="foreignconnectpending">kliknij w docelową tabelę</string>
|
||||
<string name="foreigndisconnect">Smazat cizí klíč</string>
|
||||
<string name="confirmtable">Czy na pewno usunąć tabelę</string>
|
||||
<string name="confirmrow">Czy na pewno usunąć pole</string>
|
||||
|
||||
<!-- row edit -->
|
||||
<string name="name">Nazwa</string>
|
||||
<string name="type">Typ</string>
|
||||
<string name="size">Rozmiar</string>
|
||||
<string name="def">Domyślnie</string>
|
||||
<string name="notnull">Niepuste</string>
|
||||
<string name="null">Zerowy</string>
|
||||
<string name="ai">Automatyczne zwiększanie o 1</string>
|
||||
<string name="comment">Edytuj komentarz</string>
|
||||
<string name="commenttext">Wpisz komentarz dla tego pola</string>
|
||||
<!-- row edit -->
|
||||
<string name="name">Nazwa</string>
|
||||
<string name="type">Typ</string>
|
||||
<string name="size">Rozmiar</string>
|
||||
<string name="def">Domyślnie</string>
|
||||
<string name="notnull">Niepuste</string>
|
||||
<string name="null">Zerowy</string>
|
||||
<string name="ai">Automatyczne zwiększanie o 1</string>
|
||||
<string name="comment">Edytuj komentarz</string>
|
||||
<string name="commenttext">Wpisz komentarz dla tego pola</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Anuluj</string>
|
||||
<string name="throbber">Proszę czekać...</string>
|
||||
<string name="options">Opcje</string>
|
||||
<string name="language">Język</string>
|
||||
<string name="db">Bazy danych dla nowych projektów</string>
|
||||
<string name="optionsnotice">Niektóre opcje są zatwierdzane wyłącznie po kompletnym przeładowaniu strony. Ciasteczka muszą być akceptowane dla działania opcji.</string>
|
||||
<string name="snap">Ustalana odległość tabel</string>
|
||||
<string name="optionsnapnotice">W pikselach, 0 = wyłącznie ustalania</string>
|
||||
<string name="pattern">Wzorzec dla zewnętrznych nazw</string>
|
||||
<string name="optionpatternnotice">%T = główna tabela, %R = klucz główny, %t = zewnętrzna tabela</string>
|
||||
<string name="hide">Ukryć złącza w tabeli podczas przeciągania?</string>
|
||||
<string name="vector">Rysuj pływające złącza (jesli wsperane jest przez przeglądarkę)?</string>
|
||||
<string name="showsize">Show field size in table design?</string>
|
||||
<string name="showtype">Show field datatype in table design?</string>
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Anuluj</string>
|
||||
<string name="throbber">Proszę czekać...</string>
|
||||
<string name="options">Opcje</string>
|
||||
<string name="language">Język</string>
|
||||
<string name="db">Bazy danych dla nowych projektów</string>
|
||||
<string name="optionsnotice">Niektóre opcje są zatwierdzane wyłącznie po kompletnym przeładowaniu strony. Ciasteczka muszą być akceptowane dla działania opcji.</string>
|
||||
<string name="snap">Ustalana odległość tabel</string>
|
||||
<string name="optionsnapnotice">W pikselach, 0 = wyłącznie ustalania</string>
|
||||
<string name="pattern">Wzorzec dla zewnętrznych nazw</string>
|
||||
<string name="optionpatternnotice">%T = główna tabela, %R = klucz główny, %t = zewnętrzna tabela</string>
|
||||
<string name="hide">Ukryć złącza w tabeli podczas przeciągania?</string>
|
||||
<string name="vector">Rysuj pływające złącza (jesli wsperane jest przez przeglądarkę)?</string>
|
||||
<string name="showsize">Show field size in table design?</string>
|
||||
<string name="showtype">Show field datatype in table design?</string>
|
||||
<string name="style">Styl</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Klucze</string>
|
||||
<string name="keyslistlabel">Klucze w tabeli "%s"</string>
|
||||
<string name="keytypelabel">Typ:</string>
|
||||
<string name="keynamelabel">Nazwa:</string>
|
||||
<string name="keyfieldslabel">Pola w kluczu</string>
|
||||
<string name="keyavaillabel">Dostępne pola</string>
|
||||
<string name="keyedit">Edytuj klucz</string>
|
||||
<string name="keyadd">Dodaj klucz</string>
|
||||
<string name="keyremove">Usuń klucz</string>
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Klucze</string>
|
||||
<string name="keyslistlabel">Klucze w tabeli "%s"</string>
|
||||
<string name="keytypelabel">Typ:</string>
|
||||
<string name="keynamelabel">Nazwa:</string>
|
||||
<string name="keyfieldslabel">Pola w kluczu</string>
|
||||
<string name="keyavaillabel">Dostępne pola</string>
|
||||
<string name="keyedit">Edytuj klucz</string>
|
||||
<string name="keyadd">Dodaj klucz</string>
|
||||
<string name="keyremove">Usuń klucz</string>
|
||||
|
||||
<!-- io -->
|
||||
<string name="saveload">Zapisz / Otwórz</string>
|
||||
<string name="empty">Proszę wklej kod XML w poniższe pole tekstowe i spróbuj ponownie.</string>
|
||||
<string name="clientsave">Zapisz XML</string>
|
||||
<string name="clientload">Załaduj XML</string>
|
||||
<string name="clientsql">Generuj SQL</string>
|
||||
<string name="backendlabel">Serwer wejściowy:</string>
|
||||
<string name="serversave">Zapisz</string>
|
||||
<string name="quicksave">Quicksave</string>
|
||||
<string name="serverload">Otwórz</string>
|
||||
<string name="serverlist">Lista pozycji</string>
|
||||
<string name="serverimport">Importuj z DB</string>
|
||||
<string name="serverloadprompt">Wpisz słowo kluczowe pod którym twój projekt został zapisany:</string>
|
||||
<string name="serversaveprompt">Wpisz słowo kluczowe pod którym twój projekt ma zostać zapisany:</string>
|
||||
<string name="serverimportprompt">Wpisz nazwę bazy danych do zaimportowania:</string>
|
||||
<string name="httpresponse">Odpowiedź serwera</string>
|
||||
<string name="http201">Zapisano</string>
|
||||
<string name="http404">Nie znaleziono</string>
|
||||
<string name="http500">Wewnętrzny błąd serwera</string>
|
||||
<string name="http501">Niezaimplementowane</string>
|
||||
<string name="http503">Serwer niedostępny</string>
|
||||
<!-- io -->
|
||||
<string name="saveload">Zapisz / Otwórz</string>
|
||||
<string name="empty">Proszę wklej kod XML w poniższe pole tekstowe i spróbuj ponownie.</string>
|
||||
<string name="client">Klient</string>
|
||||
<string name="server">Serwer</string>
|
||||
<string name="output">Wejście / Wyjście</string>
|
||||
<string name="clientsave">Zapisz XML</string>
|
||||
<string name="clientload">Załaduj XML</string>
|
||||
<string name="clientsql">Generuj SQL</string>
|
||||
<string name="backendlabel">Serwer wejściowy:</string>
|
||||
<string name="serversave">Zapisz</string>
|
||||
<string name="quicksave">Quicksave</string>
|
||||
<string name="serverload">Otwórz</string>
|
||||
<string name="serverlist">Lista pozycji</string>
|
||||
<string name="serverimport">Importuj z DB</string>
|
||||
<string name="serverloadprompt">Wpisz słowo kluczowe pod którym twój projekt został zapisany:</string>
|
||||
<string name="serversaveprompt">Wpisz słowo kluczowe pod którym twój projekt ma zostać zapisany:</string>
|
||||
<string name="serverimportprompt">Wpisz nazwę bazy danych do zaimportowania:</string>
|
||||
<string name="httpresponse">Odpowiedź serwera</string>
|
||||
<string name="http201">Zapisano</string>
|
||||
<string name="http404">Nie znaleziono</string>
|
||||
<string name="http500">Wewnętrzny błąd serwera</string>
|
||||
<string name="http501">Niezaimplementowane</string>
|
||||
<string name="http503">Serwer niedostępny</string>
|
||||
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">Błąd XML</string>
|
||||
<string name="docs">Dokumentacja</string>
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">Błąd XML</string>
|
||||
<string name="docs">Dokumentacja</string>
|
||||
|
||||
</locale>
|
||||
|
||||
@@ -1,94 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Adicionar tabela</string>
|
||||
<string name="edittable">Editar tabela</string>
|
||||
<string name="removetable">Remover tabela</string>
|
||||
<string name="removetables">Remover tabelas</string>
|
||||
<string name="aligntables">Alinhar tabelas</string>
|
||||
<string name="cleartables">Limpar tabelas</string>
|
||||
<string name="confirmall">Realmente excluir todas as tabelas</string>
|
||||
<string name="newtable">Nova tabela</string>
|
||||
<string name="addpending">Clique p/ adicionar</string>
|
||||
<string name="tablenamelabel">Nome</string>
|
||||
<string name="tablecommentlabel">Comentário</string>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Adicionar tabela</string>
|
||||
<string name="edittable">Editar tabela</string>
|
||||
<string name="removetable">Remover tabela</string>
|
||||
<string name="removetables">Remover tabelas</string>
|
||||
<string name="aligntables">Alinhar tabelas</string>
|
||||
<string name="cleartables">Limpar tabelas</string>
|
||||
<string name="confirmall">Realmente excluir todas as tabelas</string>
|
||||
<string name="newtable">Nova tabela</string>
|
||||
<string name="addpending">Clique p/ adicionar</string>
|
||||
<string name="tablenamelabel">Nome</string>
|
||||
<string name="tablecommentlabel">Comentário</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">Adicionar campo</string>
|
||||
<string name="editrow">Editar campo</string>
|
||||
<string name="removerow">Remover campo</string>
|
||||
<string name="uprow">Para cima</string>
|
||||
<string name="downrow">Para baixo</string>
|
||||
<string name="newrow">Novo campo</string>
|
||||
<string name="foreigncreate">Criar chave estrangeira</string>
|
||||
<string name="foreignpending">Selecione a tabela alvo(destino)</string>
|
||||
<!-- row management -->
|
||||
<string name="addrow">Adicionar campo</string>
|
||||
<string name="editrow">Editar campo</string>
|
||||
<string name="removerow">Remover campo</string>
|
||||
<string name="uprow">Para cima</string>
|
||||
<string name="downrow">Para baixo</string>
|
||||
<string name="newrow">Novo campo</string>
|
||||
<string name="foreigncreate">Criar chave estrangeira</string>
|
||||
<string name="foreignpending">Selecione a tabela alvo(destino)</string>
|
||||
<string name="foreignconnect">Conectar chave estrangeira</string>
|
||||
<string name="foreignconnectpending">Clique na linha alvo</string>
|
||||
<string name="foreigndisconnect">Remover chave estrangeira</string>
|
||||
<string name="confirmtable">Deseja realmente deletar a tabela</string>
|
||||
<string name="confirmrow">Deseja realmente deletar o campo</string>
|
||||
<string name="confirmtable">Deseja realmente deletar a tabela</string>
|
||||
<string name="confirmrow">Deseja realmente deletar o campo</string>
|
||||
|
||||
<!-- row edit -->
|
||||
<string name="name">Nome</string>
|
||||
<string name="type">Tipo</string>
|
||||
<string name="size">Tamanho</string>
|
||||
<string name="def">Default</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Auto incrementar</string>
|
||||
<string name="comment">Editar comentário</string>
|
||||
<string name="commenttext">Digite o comentário para este campo</string>
|
||||
<!-- row edit -->
|
||||
<string name="name">Nome</string>
|
||||
<string name="type">Tipo</string>
|
||||
<string name="size">Tamanho</string>
|
||||
<string name="def">Default</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Auto incrementar</string>
|
||||
<string name="comment">Editar comentário</string>
|
||||
<string name="commenttext">Digite o comentário para este campo</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Cancelar</string>
|
||||
<string name="throbber">Por favor espere...</string>
|
||||
<string name="options">Opções</string>
|
||||
<string name="language">Linguagem</string>
|
||||
<string name="db">Base de Dados para os novos designs</string>
|
||||
<string name="optionsnotice">Algumas opções serão aplicadas somente depois da página totalmente regarrecada. Cookies devem ser ativados para as opções funcionarem.</string>
|
||||
<string name="snap">Distância entre as tabelas</string>
|
||||
<string name="optionsnapnotice">Em pixels, 0 = desativar snapping</string>
|
||||
<string name="pattern">Padrão p/ nomes estrangeiros</string>
|
||||
<string name="optionpatternnotice">%T = tabela primária, %R = chave primária, %t = tabela estrangeira</string>
|
||||
<string name="hide">Esconder connectores na tela?</string>
|
||||
<string name="vector">Desenhar conectores suaves (se suportado pelo navegador)?</string>
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Cancelar</string>
|
||||
<string name="throbber">Por favor espere...</string>
|
||||
<string name="options">Opções</string>
|
||||
<string name="language">Linguagem</string>
|
||||
<string name="db">Base de Dados para os novos designs</string>
|
||||
<string name="optionsnotice">Algumas opções serão aplicadas somente depois da página totalmente regarrecada. Cookies devem ser ativados para as opções funcionarem.</string>
|
||||
<string name="snap">Distância entre as tabelas</string>
|
||||
<string name="optionsnapnotice">Em pixels, 0 = desativar snapping</string>
|
||||
<string name="pattern">Padrão p/ nomes estrangeiros</string>
|
||||
<string name="optionpatternnotice">%T = tabela primária, %R = chave primária, %t = tabela estrangeira</string>
|
||||
<string name="hide">Esconder connectores na tela?</string>
|
||||
<string name="vector">Desenhar conectores suaves (se suportado pelo navegador)?</string>
|
||||
<string name="style">Estilo</string>
|
||||
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Chaves</string>
|
||||
<string name="keyslistlabel">Chaves na tabela "%s"</string>
|
||||
<string name="keytypelabel">Tipo:</string>
|
||||
<string name="keynamelabel">Nome:</string>
|
||||
<string name="keyfieldslabel">Campos na chave</string>
|
||||
<string name="keyavaillabel">Campos disponíveis</string>
|
||||
<string name="keyedit">Editar chave</string>
|
||||
<string name="keyadd">Adicionar chave</string>
|
||||
<string name="keyremove">Remover chave</string>
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Chaves</string>
|
||||
<string name="keyslistlabel">Chaves na tabela "%s"</string>
|
||||
<string name="keytypelabel">Tipo:</string>
|
||||
<string name="keynamelabel">Nome:</string>
|
||||
<string name="keyfieldslabel">Campos na chave</string>
|
||||
<string name="keyavaillabel">Campos disponíveis</string>
|
||||
<string name="keyedit">Editar chave</string>
|
||||
<string name="keyadd">Adicionar chave</string>
|
||||
<string name="keyremove">Remover chave</string>
|
||||
|
||||
<!-- io -->
|
||||
<string name="saveload">Salvar / Carregar</string>
|
||||
<string name="empty">Por favor cole os dados XML na área de texto abaixo e tente novamente.</string>
|
||||
<string name="clientsave">Salvar XML</string>
|
||||
<string name="clientload">Carregar XML</string>
|
||||
<string name="clientsql">Gerar SQL</string>
|
||||
<string name="backendlabel"> Parâmetros do Servidor:</string>
|
||||
<string name="serversave">Salvar</string>
|
||||
<string name="serverload">Carregar</string>
|
||||
<string name="serverlist">Listar itens</string>
|
||||
<string name="serverimport">Importar do BD</string>
|
||||
<string name="serverloadprompt">Digite o nome o qual seu design foi salvo:</string>
|
||||
<string name="serversaveprompt">Digite o nome com qual seu design será salvo:</string>
|
||||
<string name="serverimportprompt">Digite o nome da base de dados à ser importada:</string>
|
||||
<string name="httpresponse"> Resposta do servidor</string>
|
||||
<string name="http201">Salvo</string>
|
||||
<string name="http404">Não Encontrado</string>
|
||||
<string name="http500">Erro Interno do Servidor</string>
|
||||
<string name="http501">Não Implementado</string>
|
||||
<string name="http503">Serviço Indisponível</string>
|
||||
<!-- io -->
|
||||
<string name="saveload">Salvar / Carregar</string>
|
||||
<string name="empty">Por favor cole os dados XML na área de texto abaixo e tente novamente.</string>
|
||||
<string name="client">Cliente</string>
|
||||
<string name="server">Servidor</string>
|
||||
<string name="output">Entrada / Saída</string>
|
||||
<string name="clientsave">Salvar XML</string>
|
||||
<string name="clientload">Carregar XML</string>
|
||||
<string name="clientsql">Gerar SQL</string>
|
||||
<string name="backendlabel"> Parâmetros do Servidor:</string>
|
||||
<string name="serversave">Salvar</string>
|
||||
<string name="serverload">Carregar</string>
|
||||
<string name="serverlist">Listar itens</string>
|
||||
<string name="serverimport">Importar do BD</string>
|
||||
<string name="serverloadprompt">Digite o nome o qual seu design foi salvo:</string>
|
||||
<string name="serversaveprompt">Digite o nome com qual seu design será salvo:</string>
|
||||
<string name="serverimportprompt">Digite o nome da base de dados à ser importada:</string>
|
||||
<string name="httpresponse"> Resposta do servidor</string>
|
||||
<string name="http201">Salvo</string>
|
||||
<string name="http404">Não Encontrado</string>
|
||||
<string name="http500">Erro Interno do Servidor</string>
|
||||
<string name="http501">Não Implementado</string>
|
||||
<string name="http503">Serviço Indisponível</string>
|
||||
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">Erro de XML</string>
|
||||
<string name="docs">Documentação</string>
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">Erro de XML</string>
|
||||
<string name="docs">Documentação</string>
|
||||
|
||||
</locale>
|
||||
|
||||
@@ -1,94 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Adauga tabela</string>
|
||||
<string name="edittable">Editeaza tabela</string>
|
||||
<string name="removetable">Sterge tabela</string>
|
||||
<string name="removetables">Sterge tabelele</string>
|
||||
<string name="aligntables">Aliniaza tabelele</string>
|
||||
<string name="cleartables">Sterge tabelele</string>
|
||||
<string name="confirmall">Sterge toate tabelele</string>
|
||||
<string name="newtable">(nume tabela)</string>
|
||||
<string name="addpending">plaseaza tabela</string>
|
||||
<string name="tablenamelabel">Nume</string>
|
||||
<string name="tablecommentlabel">Comentariu</string>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Adauga tabela</string>
|
||||
<string name="edittable">Editeaza tabela</string>
|
||||
<string name="removetable">Sterge tabela</string>
|
||||
<string name="removetables">Sterge tabelele</string>
|
||||
<string name="aligntables">Aliniaza tabelele</string>
|
||||
<string name="cleartables">Sterge tabelele</string>
|
||||
<string name="confirmall">Sterge toate tabelele</string>
|
||||
<string name="newtable">(nume tabela)</string>
|
||||
<string name="addpending">plaseaza tabela</string>
|
||||
<string name="tablenamelabel">Nume</string>
|
||||
<string name="tablecommentlabel">Comentariu</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">Adauga coloana</string>
|
||||
<string name="editrow">Editeaza coloana</string>
|
||||
<string name="removerow">Sterge coloana</string>
|
||||
<string name="uprow">Sus</string>
|
||||
<string name="downrow">Jos</string>
|
||||
<string name="newrow">coloana noua</string>
|
||||
<string name="foreigncreate">Creaza FK</string>
|
||||
<string name="foreignpending">alege destinatie</string>
|
||||
<string name="foreignconnect">Conexiune FK</string>
|
||||
<string name="foreignconnectpending">alege destinatie</string>
|
||||
<string name="foreigndisconnect">Sterge FK</string>
|
||||
<string name="confirmtable">Sterge tabela</string>
|
||||
<string name="confirmrow">Sterge coloana</string>
|
||||
<!-- row management -->
|
||||
<string name="addrow">Adauga coloana</string>
|
||||
<string name="editrow">Editeaza coloana</string>
|
||||
<string name="removerow">Sterge coloana</string>
|
||||
<string name="uprow">Sus</string>
|
||||
<string name="downrow">Jos</string>
|
||||
<string name="newrow">coloana noua</string>
|
||||
<string name="foreigncreate">Creaza FK</string>
|
||||
<string name="foreignpending">alege destinatie</string>
|
||||
<string name="foreignconnect">Conexiune FK</string>
|
||||
<string name="foreignconnectpending">alege destinatie</string>
|
||||
<string name="foreigndisconnect">Sterge FK</string>
|
||||
<string name="confirmtable">Sterge tabela</string>
|
||||
<string name="confirmrow">Sterge coloana</string>
|
||||
|
||||
<!-- editare rand -->
|
||||
<string name="name">Nume</string>
|
||||
<string name="type">Tip</string>
|
||||
<string name="size">Dimensiune</string>
|
||||
<string name="def">Valoare default</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Auto increment</string>
|
||||
<string name="comment">Editare comentariu</string>
|
||||
<string name="commenttext">Introduceti comentariul pentru aceasta coloana:</string>
|
||||
<!-- editare rand -->
|
||||
<string name="name">Nume</string>
|
||||
<string name="type">Tip</string>
|
||||
<string name="size">Dimensiune</string>
|
||||
<string name="def">Valoare default</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Auto increment</string>
|
||||
<string name="comment">Editare comentariu</string>
|
||||
<string name="commenttext">Introduceti comentariul pentru aceasta coloana:</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Anuleaza</string>
|
||||
<string name="throbber">Asteptati va rog...</string>
|
||||
<string name="options">Optiuni</string>
|
||||
<string name="language">Limbaj</string>
|
||||
<string name="db">Baza de date pentru design</string>
|
||||
<string name="optionsnotice">Anumite optiuni devin active numai dupa o reincarcare completa a paginii. Cookies trebuie sa fie activate pentru browser.</string>
|
||||
<string name="snap">Distanta automata intre tabele</string>
|
||||
<string name="optionsnapnotice">In pixeli, 0 = dezactiveaza asezarea automata</string>
|
||||
<string name="pattern">Modelul pentru nume de Foreign Keys</string>
|
||||
<string name="optionpatternnotice">%T = Tabela primara, %R = Primary key, %t = Tabela cu Foreign key</string>
|
||||
<string name="hide">Ascunde conexiunile la mutarea tabelei?</string>
|
||||
<string name="vector">Deseneaza folosind "smooth connectors" (daca browserul suporta)?</string>
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Anuleaza</string>
|
||||
<string name="throbber">Asteptati va rog...</string>
|
||||
<string name="options">Optiuni</string>
|
||||
<string name="language">Limbaj</string>
|
||||
<string name="db">Baza de date pentru design</string>
|
||||
<string name="optionsnotice">Anumite optiuni devin active numai dupa o reincarcare completa a paginii. Cookies trebuie sa fie activate pentru browser.</string>
|
||||
<string name="snap">Distanta automata intre tabele</string>
|
||||
<string name="optionsnapnotice">In pixeli, 0 = dezactiveaza asezarea automata</string>
|
||||
<string name="pattern">Modelul pentru nume de Foreign Keys</string>
|
||||
<string name="optionpatternnotice">%T = Tabela primara, %R = Primary key, %t = Tabela cu Foreign key</string>
|
||||
<string name="hide">Ascunde conexiunile la mutarea tabelei?</string>
|
||||
<string name="vector">Deseneaza folosind "smooth connectors" (daca browserul suporta)?</string>
|
||||
<string name="style">Stil</string>
|
||||
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Keys / Indexes</string>
|
||||
<string name="keyslistlabel">Keys / Indexes in tabela "%s"</string>
|
||||
<string name="keytypelabel">Tip:</string>
|
||||
<string name="keynamelabel">Nume:</string>
|
||||
<string name="keyfieldslabel">Campuri selectate</string>
|
||||
<string name="keyavaillabel">Campuri disponibile</string>
|
||||
<string name="keyedit">Editeaza</string>
|
||||
<string name="keyadd">Adauga</string>
|
||||
<string name="keyremove">Sterge</string>
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Keys / Indexes</string>
|
||||
<string name="keyslistlabel">Keys / Indexes in tabela "%s"</string>
|
||||
<string name="keytypelabel">Tip:</string>
|
||||
<string name="keynamelabel">Nume:</string>
|
||||
<string name="keyfieldslabel">Campuri selectate</string>
|
||||
<string name="keyavaillabel">Campuri disponibile</string>
|
||||
<string name="keyedit">Editeaza</string>
|
||||
<string name="keyadd">Adauga</string>
|
||||
<string name="keyremove">Sterge</string>
|
||||
|
||||
<!-- io -->
|
||||
<string name="saveload">Salveaza / Incarca</string>
|
||||
<string name="empty">Introduceti codul XML si re-incercati.</string>
|
||||
<string name="clientsave">Genereaza XML</string>
|
||||
<string name="clientload">Incarca din XML</string>
|
||||
<string name="clientsql">Genereaza SQL</string>
|
||||
<string name="backendlabel">Server backend:</string>
|
||||
<string name="serversave">Salveaza</string>
|
||||
<string name="serverload">Incarca</string>
|
||||
<string name="serverlist">Lista de salvari</string>
|
||||
<string name="serverimport">Import tabele din baza de date</string>
|
||||
<string name="serverloadprompt">Introduceti numele sub care a fost salvat design-ul:</string>
|
||||
<string name="serversaveprompt">Introduceti numele sub care va fi salvat design-ul:</string>
|
||||
<string name="serverimportprompt">Introduceti numele bazei de date care va fi importata:</string>
|
||||
<string name="httpresponse">Server response</string>
|
||||
<string name="http201">Salvare efectuata</string>
|
||||
<string name="http404">Not Found</string>
|
||||
<string name="http500">Internal Server Error</string>
|
||||
<string name="http501">Not Implemented</string>
|
||||
<string name="http503">Service Unavailable</string>
|
||||
<!-- io -->
|
||||
<string name="saveload">Salveaza / Incarca</string>
|
||||
<string name="empty">Introduceti codul XML si re-incercati.</string>
|
||||
<string name="client">Client</string>
|
||||
<string name="server">Server</string>
|
||||
<string name="output">Input / Output</string>
|
||||
<string name="clientsave">Genereaza XML</string>
|
||||
<string name="clientload">Incarca din XML</string>
|
||||
<string name="clientsql">Genereaza SQL</string>
|
||||
<string name="backendlabel">Server backend:</string>
|
||||
<string name="serversave">Salveaza</string>
|
||||
<string name="serverload">Incarca</string>
|
||||
<string name="serverlist">Lista de salvari</string>
|
||||
<string name="serverimport">Import tabele din baza de date</string>
|
||||
<string name="serverloadprompt">Introduceti numele sub care a fost salvat design-ul:</string>
|
||||
<string name="serversaveprompt">Introduceti numele sub care va fi salvat design-ul:</string>
|
||||
<string name="serverimportprompt">Introduceti numele bazei de date care va fi importata:</string>
|
||||
<string name="httpresponse">Server response</string>
|
||||
<string name="http201">Salvare efectuata</string>
|
||||
<string name="http404">Not Found</string>
|
||||
<string name="http500">Internal Server Error</string>
|
||||
<string name="http501">Not Implemented</string>
|
||||
<string name="http503">Service Unavailable</string>
|
||||
|
||||
<!-- diverse -->
|
||||
<string name="xmlerror">Eroare XML</string>
|
||||
<string name="docs">Documentatie</string>
|
||||
<!-- diverse -->
|
||||
<string name="xmlerror">Eroare XML</string>
|
||||
<string name="docs">Documentatie</string>
|
||||
|
||||
</locale>
|
||||
|
||||
@@ -1,94 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Добавить таблицу</string>
|
||||
<string name="edittable">Редактировать таблицу</string>
|
||||
<string name="removetable">Удалить таблицу</string>
|
||||
<string name="removetables">Удалить таблицы</string>
|
||||
<string name="aligntables">Выровнять таблицы</string>
|
||||
<string name="cleartables">Очистить таблицы</string>
|
||||
<string name="confirmall">Действительно удалить все таблицы</string>
|
||||
<string name="newtable">новая таблица</string>
|
||||
<string name="addpending">расположите таблицу</string>
|
||||
<string name="tablenamelabel">Имя</string>
|
||||
<string name="tablecommentlabel">Коментарий</string>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Добавить таблицу</string>
|
||||
<string name="edittable">Редактировать таблицу</string>
|
||||
<string name="removetable">Удалить таблицу</string>
|
||||
<string name="removetables">Удалить таблицы</string>
|
||||
<string name="aligntables">Выровнять таблицы</string>
|
||||
<string name="cleartables">Очистить таблицы</string>
|
||||
<string name="confirmall">Действительно удалить все таблицы</string>
|
||||
<string name="newtable">новая таблица</string>
|
||||
<string name="addpending">расположите таблицу</string>
|
||||
<string name="tablenamelabel">Имя</string>
|
||||
<string name="tablecommentlabel">Коментарий</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">Добавить поле</string>
|
||||
<string name="editrow">Редактировать поле</string>
|
||||
<string name="removerow">Удалить поле</string>
|
||||
<string name="uprow">Вверх</string>
|
||||
<string name="downrow">Вниз</string>
|
||||
<string name="newrow">новое поле</string>
|
||||
<string name="foreigncreate">Создать внешний ключь</string>
|
||||
<string name="foreignpending">щелкните по целевой таблице</string>
|
||||
<string name="foreignconnect">?</string>
|
||||
<string name="foreignconnectpending">?</string>
|
||||
<string name="foreigndisconnect">?</string>
|
||||
<string name="confirmtable">Действительно удалить таблицу</string>
|
||||
<string name="confirmrow">Действительно удалить поле</string>
|
||||
<!-- row management -->
|
||||
<string name="addrow">Добавить поле</string>
|
||||
<string name="editrow">Редактировать поле</string>
|
||||
<string name="removerow">Удалить поле</string>
|
||||
<string name="uprow">Вверх</string>
|
||||
<string name="downrow">Вниз</string>
|
||||
<string name="newrow">новое поле</string>
|
||||
<string name="foreigncreate">Создать внешний ключ</string>
|
||||
<string name="foreignpending">щелкните по целевой таблице</string>
|
||||
<string name="foreignconnect">Присоединить внешний ключ</string>
|
||||
<string name="foreignconnectpending">щёлкните по целевой таблице</string>
|
||||
<string name="foreigndisconnect">Удалить внешний ключ</string>
|
||||
<string name="confirmtable">Действительно удалить таблицу</string>
|
||||
<string name="confirmrow">Действительно удалить поле</string>
|
||||
|
||||
<!-- row edit -->
|
||||
<string name="name">Имя</string>
|
||||
<string name="type">Тип</string>
|
||||
<string name="size">Размер</string>
|
||||
<string name="def">По умолчанию</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Autoincrement</string>
|
||||
<string name="comment">Изменить коментарий</string>
|
||||
<string name="commenttext">Введите коментарий для этого поля</string>
|
||||
<!-- row edit -->
|
||||
<string name="name">Имя</string>
|
||||
<string name="type">Тип</string>
|
||||
<string name="size">Размер</string>
|
||||
<string name="def">По умолчанию</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Автоинкремент</string>
|
||||
<string name="comment">Изменить коментарий</string>
|
||||
<string name="commenttext">Введите коментарий для этого поля</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Отменить</string>
|
||||
<string name="throbber">Пожалуйста подождите...</string>
|
||||
<string name="options">Опции</string>
|
||||
<string name="language">Язык</string>
|
||||
<string name="db">База данных для новых дизайнов</string>
|
||||
<string name="optionsnotice">Некоторые опции заработают только после полной перезагрузки страницы. Cookie должны быть включены.</string>
|
||||
<string name="snap">Table snap distance</string>
|
||||
<string name="optionsnapnotice">В пикселях, 0 = disable snapping</string>
|
||||
<string name="pattern">Pattern for foreign names</string>
|
||||
<string name="optionpatternnotice">%T = primary table, %R = primary key, %t = foreign table</string>
|
||||
<string name="hide">Прятать связи при перетаскивании таблиц?</string>
|
||||
<string name="vector">Рисовать сглаженные связи (если поддерживается браузером)?</string>
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Отменить</string>
|
||||
<string name="throbber">Пожалуйста подождите...</string>
|
||||
<string name="options">Опции</string>
|
||||
<string name="language">Язык</string>
|
||||
<string name="db">База данных для новых схем</string>
|
||||
<string name="optionsnotice">Некоторые опции заработают только после полной перезагрузки страницы. Cookie должны быть включены.</string>
|
||||
<string name="snap">Шаг при перемещении таблицы</string>
|
||||
<string name="optionsnapnotice">В пикселях, 0 = отключить</string>
|
||||
<string name="pattern">Шаблон для имён внешних ключей</string>
|
||||
<string name="optionpatternnotice">%T = первичная таблица, %R = первичный ключ, %t = внешняя таблица</string>
|
||||
<string name="hide">Прятать связи при перетаскивании таблиц?</string>
|
||||
<string name="vector">Рисовать сглаженные связи (если поддерживается браузером)?</string>
|
||||
<string name="showsize">Показывать размеры полей таблиц?</string>
|
||||
<string name="showtype">Показывать типы данных полей таблиц?</string>
|
||||
<string name="style">Стиль</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Ключи</string>
|
||||
<string name="keyslistlabel">Ключи в таблице "%s"</string>
|
||||
<string name="keytypelabel">Тип:</string>
|
||||
<string name="keynamelabel">Имя:</string>
|
||||
<string name="keyfieldslabel">Поля в ключе</string>
|
||||
<string name="keyavaillabel">Доступные поля</string>
|
||||
<string name="keyedit">Редактировать ключ</string>
|
||||
<string name="keyadd">Добавить ключ</string>
|
||||
<string name="keyremove">Удалить ключ</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Ключи</string>
|
||||
<string name="keyslistlabel">Ключи в таблице "%s"</string>
|
||||
<string name="keytypelabel">Тип:</string>
|
||||
<string name="keynamelabel">Имя:</string>
|
||||
<string name="keyfieldslabel">Поля в ключе</string>
|
||||
<string name="keyavaillabel">Доступные поля</string>
|
||||
<string name="keyedit">Редактировать ключь</string>
|
||||
<string name="keyadd">Добавить ключь</string>
|
||||
<string name="keyremove">Удалить ключь</string>
|
||||
<!-- io -->
|
||||
<string name="saveload">Сохранить / Загрузить</string>
|
||||
<string name="empty">Пожалуйста, вставьте XML данные в поле ниже и попробуйте ещё раз.</string>
|
||||
<string name="client">Клиент</string>
|
||||
<string name="server">Сервер</string>
|
||||
<string name="output">Ввод / Вывод</string>
|
||||
<string name="clientsave">Сохранить XML</string>
|
||||
<string name="clientload">Загрузить XML</string>
|
||||
<string name="clientlocalsave">Сохранить в браузере</string>
|
||||
<string name="clientlocalload">Загрузить из браузера</string>
|
||||
<string name="clientlocallist">Получить список схем из браузера</string>
|
||||
<string name="dropboxsave">Сохранить в Dropbox</string>
|
||||
<string name="dropboxload">Загрузить из Dropbox</string>
|
||||
<string name="dropboxlist">Получить список из Dropbox</string>
|
||||
<string name="clientsql">Генерировать SQL</string>
|
||||
<string name="backendlabel">Серверные технологии:</string>
|
||||
<string name="serversave">Сохранить</string>
|
||||
<string name="quicksave">Быстрое сохранение</string>
|
||||
<string name="serverload">Загрузить</string>
|
||||
<string name="serverlist">Получить список схем</string>
|
||||
<string name="serverimport">Импортировать из БД</string>
|
||||
<string name="serverloadprompt">Введите ключевое слово под которым сохранена ваша схема:</string>
|
||||
<string name="serversaveprompt">Введите ключевое слово под которым будет сохранена ваша схема:</string>
|
||||
<string name="serverimportprompt">Введите имя импортируемой базы данных:</string>
|
||||
<string name="httpresponse">Ответ сервера</string>
|
||||
<string name="http201">Сохранено</string>
|
||||
<string name="http404">Не найдено</string>
|
||||
<string name="http500">Внутренняя ошибка сервера</string>
|
||||
<string name="http501">Не реализовано</string>
|
||||
<string name="http503">Служба недоступна</string>
|
||||
|
||||
<!-- io -->
|
||||
<string name="saveload">Сохранить / Загрузить</string>
|
||||
<string name="empty">Пожалуйста, вставьте XML данные в поле ниже и попробуйте ещё раз.</string>
|
||||
<string name="clientsave">Сохранить XML</string>
|
||||
<string name="clientload">Загрузить XML</string>
|
||||
<string name="clientsql">Генерировать SQL</string>
|
||||
<string name="backendlabel">Использовать для сохранения сервис:</string>
|
||||
<string name="serversave">Сохранить</string>
|
||||
<string name="serverload">Загрузить</string>
|
||||
<string name="serverlist">Список items</string>
|
||||
<string name="serverimport">Импортировать из БД</string>
|
||||
<string name="serverloadprompt">Введите ключевое слово под которым ваш дизайн сохранен:</string>
|
||||
<string name="serversaveprompt">Введите ключевое слово под которым ваш дизайн будет сохранен:</string>
|
||||
<string name="serverimportprompt">Введите имя импортируемой базы данных:</string>
|
||||
<string name="httpresponse">Ответ сервера</string>
|
||||
<string name="http201">Saved</string>
|
||||
<string name="http404">Not Found</string>
|
||||
<string name="http500">Internal Server Error</string>
|
||||
<string name="http501">Not Implemented</string>
|
||||
<string name="http503">Service Unavailable</string>
|
||||
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">Ошибка XML</string>
|
||||
<string name="docs">Документация</string>
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">Ошибка XML</string>
|
||||
<string name="docs">Документация</string>
|
||||
|
||||
</locale>
|
||||
|
||||
@@ -1,94 +1,97 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- tabell management -->
|
||||
<string name="addtable">Skapa tabell</string>
|
||||
<string name="edittable">Redigera tabell</string>
|
||||
<string name="removetable">Ta bort tabell</string>
|
||||
<string name="removetables">Ta bort tabeller</string>
|
||||
<string name="aligntables">Räta upp tabeller</string>
|
||||
<string name="cleartables">Ta bort alla tabeller</string>
|
||||
<string name="confirmall">Vill du verkligen ta bort alla tabeller</string>
|
||||
<string name="newtable">Ny tabell</string>
|
||||
<string name="addpending">Placera tabell</string>
|
||||
<string name="tablenamelabel">Namn</string>
|
||||
<string name="tablecommentlabel">Kommentar</string>
|
||||
<!-- tabell management -->
|
||||
<string name="addtable">Skapa tabell</string>
|
||||
<string name="edittable">Redigera tabell</string>
|
||||
<string name="removetable">Ta bort tabell</string>
|
||||
<string name="removetables">Ta bort tabeller</string>
|
||||
<string name="aligntables">Räta upp tabeller</string>
|
||||
<string name="cleartables">Ta bort alla tabeller</string>
|
||||
<string name="confirmall">Vill du verkligen ta bort alla tabeller</string>
|
||||
<string name="newtable">Ny tabell</string>
|
||||
<string name="addpending">Placera tabell</string>
|
||||
<string name="tablenamelabel">Namn</string>
|
||||
<string name="tablecommentlabel">Kommentar</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">Lägg till fält</string>
|
||||
<string name="editrow">Redigera fält</string>
|
||||
<string name="removerow">Ta bort field</string>
|
||||
<string name="uprow">Upp</string>
|
||||
<string name="downrow">Ner</string>
|
||||
<string name="newrow">Ny field</string>
|
||||
<string name="foreigncreate">Skapa främmande nyckel</string>
|
||||
<string name="foreignpending">Klicka på motsvarande tabell</string>
|
||||
<string name="foreignconnect">Anslut främmande nycke</string>
|
||||
<string name="foreignconnectpending">Välj motsvarande rad</string>
|
||||
<string name="foreigndisconnect">Ta bort främmande nyckel</string>
|
||||
<string name="confirmtable">Vill du verkligen ta bort denna tabell?</string>
|
||||
<string name="confirmrow">Vill du verkligen ta bort detta fält?</string>
|
||||
<!-- row management -->
|
||||
<string name="addrow">Lägg till fält</string>
|
||||
<string name="editrow">Redigera fält</string>
|
||||
<string name="removerow">Ta bort field</string>
|
||||
<string name="uprow">Upp</string>
|
||||
<string name="downrow">Ner</string>
|
||||
<string name="newrow">Ny field</string>
|
||||
<string name="foreigncreate">Skapa främmande nyckel</string>
|
||||
<string name="foreignpending">Klicka på motsvarande tabell</string>
|
||||
<string name="foreignconnect">Anslut främmande nycke</string>
|
||||
<string name="foreignconnectpending">Välj motsvarande rad</string>
|
||||
<string name="foreigndisconnect">Ta bort främmande nyckel</string>
|
||||
<string name="confirmtable">Vill du verkligen ta bort denna tabell?</string>
|
||||
<string name="confirmrow">Vill du verkligen ta bort detta fält?</string>
|
||||
|
||||
<!-- row edit -->
|
||||
<string name="name">Namn</string>
|
||||
<string name="type">Typ</string>
|
||||
<string name="size">Storlek</string>
|
||||
<string name="def">Standard</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Autoincrement</string>
|
||||
<string name="comment">Redigera kommentar</string>
|
||||
<string name="commenttext">Ange kommentar för detta fält</string>
|
||||
<!-- row edit -->
|
||||
<string name="name">Namn</string>
|
||||
<string name="type">Typ</string>
|
||||
<string name="size">Storlek</string>
|
||||
<string name="def">Standard</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Autoincrement</string>
|
||||
<string name="comment">Redigera kommentar</string>
|
||||
<string name="commenttext">Ange kommentar för detta fält</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Avbryt</string>
|
||||
<string name="throbber">Var god vänta...</string>
|
||||
<string name="options">Alternativ</string>
|
||||
<string name="language">Språk</string>
|
||||
<string name="db">Databas for nya designer</string>
|
||||
<string name="optionsnotice">Vissa alternativ ändras bara efter att du laddat om sidan. Cookies krävs för att alternativ ska fungera.</string>
|
||||
<string name="snap">Tabellers fästavstånd</string>
|
||||
<string name="optionsnapnotice">Ange pixlar, 0 = stäng av fästning</string>
|
||||
<string name="pattern">Mönster för främmande namn</string>
|
||||
<string name="optionpatternnotice">%T = primär tabell, %R = primär nycke, %t = främmande tabell</string>
|
||||
<string name="hide">Dölj anslutningar när du drar i tabellen?</string>
|
||||
<string name="vector">Rita mjuka anslutningar (om din webbläsare stöder det)?</string>
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">OK</string>
|
||||
<string name="windowcancel">Avbryt</string>
|
||||
<string name="throbber">Var god vänta...</string>
|
||||
<string name="options">Alternativ</string>
|
||||
<string name="language">Språk</string>
|
||||
<string name="db">Databas for nya designer</string>
|
||||
<string name="optionsnotice">Vissa alternativ ändras bara efter att du laddat om sidan. Cookies krävs för att alternativ ska fungera.</string>
|
||||
<string name="snap">Tabellers fästavstånd</string>
|
||||
<string name="optionsnapnotice">Ange pixlar, 0 = stäng av fästning</string>
|
||||
<string name="pattern">Mönster för främmande namn</string>
|
||||
<string name="optionpatternnotice">%T = primär tabell, %R = primär nycke, %t = främmande tabell</string>
|
||||
<string name="hide">Dölj anslutningar när du drar i tabellen?</string>
|
||||
<string name="vector">Rita mjuka anslutningar (om din webbläsare stöder det)?</string>
|
||||
<string name="style">Stil</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Nycklar</string>
|
||||
<string name="keyslistlabel">Nycklar i tabellen "%s"</string>
|
||||
<string name="keytypelabel">Typ:</string>
|
||||
<string name="keynamelabel">Namn:</string>
|
||||
<string name="keyfieldslabel">Fields in nyckel</string>
|
||||
<string name="keyavaillabel">Available fields</string>
|
||||
<string name="keyedit">Edit nyckel</string>
|
||||
<string name="keyadd">Add key</string>
|
||||
<string name="keyremove">Ta bort key</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Nycklar</string>
|
||||
<string name="keyslistlabel">Nycklar i tabellen "%s"</string>
|
||||
<string name="keytypelabel">Typ:</string>
|
||||
<string name="keynamelabel">Namn:</string>
|
||||
<string name="keyfieldslabel">Fields in nyckel</string>
|
||||
<string name="keyavaillabel">Available fields</string>
|
||||
<string name="keyedit">Edit nyckel</string>
|
||||
<string name="keyadd">Add key</string>
|
||||
<string name="keyremove">Ta bort key</string>
|
||||
<!-- io -->
|
||||
<string name="saveload">Spara / Ladda</string>
|
||||
<string name="empty">Vänligen klistra in XML i textrutan nedan och försök igen.</string>
|
||||
<string name="client">Klient</string>
|
||||
<string name="server">Server</string>
|
||||
<string name="output">Input / Output</string>
|
||||
<string name="clientsave">Spara XML</string>
|
||||
<string name="clientload">Ladda XML</string>
|
||||
<string name="clientsql">Generera SQL</string>
|
||||
<string name="backendlabel">Server backend:</string>
|
||||
<string name="serversave">Spara</string>
|
||||
<string name="serverload">Ladda</string>
|
||||
<string name="serverlist">Lista innehåll</string>
|
||||
<string name="serverimport">Importera från DB</string>
|
||||
<string name="serverloadprompt">Ange vilket nyckelord din design sparades under:</string>
|
||||
<string name="serversaveprompt">Ange vilket nyckelord din design ska sparas under:</string>
|
||||
<string name="serverimportprompt">Ange namnet på databasen som ska importeras:</string>
|
||||
<string name="httpresponse">Serversvar</string>
|
||||
<string name="http201">Sparad</string>
|
||||
<string name="http404">Ej funnen</string>
|
||||
<string name="http500">Intert serverfel</string>
|
||||
<string name="http501">Ej implementerat</string>
|
||||
<string name="http503">Service Unavailable</string>
|
||||
|
||||
<!-- io -->
|
||||
<string name="saveload">Spara / Ladda</string>
|
||||
<string name="empty">Vänligen klistra in XML i textrutan nedan och försök igen.</string>
|
||||
<string name="clientsave">Spara XML</string>
|
||||
<string name="clientload">Ladda XML</string>
|
||||
<string name="clientsql">Generera SQL</string>
|
||||
<string name="backendlabel">Server backend:</string>
|
||||
<string name="serversave">Spara</string>
|
||||
<string name="serverload">Ladda</string>
|
||||
<string name="serverlist">Lista innehåll</string>
|
||||
<string name="serverimport">Importera från DB</string>
|
||||
<string name="serverloadprompt">Ange vilket nyckelord din design sparades under:</string>
|
||||
<string name="serversaveprompt">Ange vilket nyckelord din design ska sparas under:</string>
|
||||
<string name="serverimportprompt">Ange namnet på databasen som ska importeras:</string>
|
||||
<string name="httpresponse">Serversvar</string>
|
||||
<string name="http201">Sparad</string>
|
||||
<string name="http404">Ej funnen</string>
|
||||
<string name="http500">Intert serverfel</string>
|
||||
<string name="http501">Ej implementerat</string>
|
||||
<string name="http503">Service Unavailable</string>
|
||||
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XML error</string>
|
||||
<string name="docs">Dokumentation</string>
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XML error</string>
|
||||
<string name="docs">Dokumentation</string>
|
||||
|
||||
</locale>
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Tablo Ekle</string>
|
||||
<string name="edittable">Tablo Düzenle</string>
|
||||
<string name="removetable">Tablo Sil</string>
|
||||
<string name="removetables">Tabloları Sil</string>
|
||||
<string name="aligntables">Tabloları Hizala</string>
|
||||
<string name="cleartables">Tabloları Temizle</string>
|
||||
<string name="confirmall">Gerçekten tabloları sil</string>
|
||||
<string name="newtable">Yeni Tablo</string>
|
||||
<string name="addpending">Tablo Yerleşim Yeri</string>
|
||||
<string name="tablenamelabel">Adı</string>
|
||||
<string name="tablecommentlabel">Açıklama</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">Alan Ekle</string>
|
||||
<string name="editrow">Alan Düzenle</string>
|
||||
<string name="removerow">Alan Sil</string>
|
||||
<string name="uprow">Yukarı</string>
|
||||
<string name="downrow">Aşağıya</string>
|
||||
<string name="newrow">Yeni Alan</string>
|
||||
<string name="foreigncreate">Foreign Key Oluştur</string>
|
||||
<string name="foreignpending">Hedef Tablosuna Tıkla</string>
|
||||
<string name="foreignconnect">Foreign Key Bağlan</string>
|
||||
<string name="foreignconnectpending">Hedef Satırı Tıklayın</string>
|
||||
<string name="foreigndisconnect">Foreign Key Sil</string>
|
||||
<string name="confirmtable">Gerçekten Tabloyu Sil</string>
|
||||
<string name="confirmrow">Gerçekten Alanı Sil</string>
|
||||
|
||||
<!-- row edit -->
|
||||
<string name="name">Name</string>
|
||||
<string name="type">Type</string>
|
||||
<string name="size">Size</string>
|
||||
<string name="def">Default</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Autoincrement</string>
|
||||
<string name="comment">Yorumu düzenle</string>
|
||||
<string name="commenttext">Bu alan için yorum girin</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">Tamam</string>
|
||||
<string name="windowcancel">İptal</string>
|
||||
<string name="throbber">Lütfen Bekleyiniz...</string>
|
||||
<string name="options">Ayarlar</string>
|
||||
<string name="language">Diller</string>
|
||||
<string name="db">Yeni tasarımlar için veritabanı</string>
|
||||
<string name="optionsnotice">Bazı seçenekler yalnızca tam sayfa yeniden yüklendikten sonra uygulanır. Seçeneklerin çalışması için çerezlerin etkinleştirilmesi gerekir.</string>
|
||||
<string name="snap">Table snap distance</string>
|
||||
<string name="optionsnapnotice">In pixels, 0 = disable snapping</string>
|
||||
<string name="pattern">Pattern for foreign names</string>
|
||||
<string name="optionpatternnotice">%T = primary table, %R = primary key, %t = foreign table</string>
|
||||
<string name="hide">Tablo sürüklemesindeki bağlayıcıları gizle?</string>
|
||||
<string name="vector">Draw smooth connectors (if supported by browser)?</string>
|
||||
<string name="showsize">Tablo tasarımında alan boyutunu gösterme?</string>
|
||||
<string name="showtype">Alan veri tipini tablo tasarımında göster?</string>
|
||||
<string name="style">Stil</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Anahtarlar</string>
|
||||
<string name="keyslistlabel">Tablodaki tuşlar "%s"</string>
|
||||
<string name="keytypelabel">Tipi:</string>
|
||||
<string name="keynamelabel">Adı:</string>
|
||||
<string name="keyfieldslabel">Anahtardaki Alanlar</string>
|
||||
<string name="keyavaillabel">Mevcut Alanlar</string>
|
||||
<string name="keyedit">Anahtar Düzenle</string>
|
||||
<string name="keyadd">Anahtar Ekle</string>
|
||||
<string name="keyremove">Anahtar Sil</string>
|
||||
|
||||
<!-- io -->
|
||||
<string name="saveload">Kaydet / Yükle</string>
|
||||
<string name="empty">Lütfen XML verilerini aşağıdaki metin alanına yapıştırın ve tekrar deneyin.</string>
|
||||
<string name="client">İstemci</string>
|
||||
<string name="server">Sunucu</string>
|
||||
<string name="output">Giriş / Çıkış</string>
|
||||
<string name="clientsave">XML Kaydet</string>
|
||||
<string name="clientload">XML Yükle</string>
|
||||
<string name="clientlocalsave">Browser'a Kaydet</string>
|
||||
<string name="clientlocalload">Browser'a Yükle</string>
|
||||
<string name="clientlocallist">Browser'da Listele</string>
|
||||
<string name="dropboxsave">Dropbox Kaydet</string>
|
||||
<string name="dropboxload">Dropbox Yükle</string>
|
||||
<string name="dropboxlist">Dropbox Listele</string>
|
||||
<string name="clientsql">SQL oluştur</string>
|
||||
<string name="backendlabel">Sunucu Kısmı:</string>
|
||||
<string name="serversave">Kaydet</string>
|
||||
<string name="quicksave">Hızlı Kayıt</string>
|
||||
<string name="serverload">Yükle</string>
|
||||
<string name="serverlist">Ürünleri Listele</string>
|
||||
<string name="serverimport">DB'den içe aktar</string>
|
||||
<string name="serverloadprompt">Tasarımınızın kaydedildiği anahtar kelimeyi girin:</string>
|
||||
<string name="serversaveprompt">Tasarımınızın kaydedileceği anahtar kelimeyi girin:</string>
|
||||
<string name="serverimportprompt">Yüklenecek veritabanının adını girin:</string>
|
||||
<string name="httpresponse">Sunucu yanıtı</string>
|
||||
<string name="http201">Kaydedilmiş</string>
|
||||
<string name="http404">Bulunamadı</string>
|
||||
<string name="http500">İç Sunucu Hatası</string>
|
||||
<string name="http501">Uygulanmadı</string>
|
||||
<string name="http503">Hizmet Kullanılamıyor</string>
|
||||
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XML hatası</string>
|
||||
<string name="docs">Belgeleme</string>
|
||||
|
||||
</locale>
|
||||
@@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- table management -->
|
||||
<string name="addtable">Додати таблицю</string>
|
||||
<string name="edittable">Змінити таблицю</string>
|
||||
<string name="removetable">Вилучити таблицю</string>
|
||||
<string name="removetables">Вилучити таблиці</string>
|
||||
<string name="aligntables">Вирівняти таблиці</string>
|
||||
<string name="cleartables">Очистити таблиці</string>
|
||||
<string name="confirmall">Справді вилучити всі таблиці</string>
|
||||
<string name="newtable">нова таблиця</string>
|
||||
<string name="addpending">помістити таблицю</string>
|
||||
<string name="tablenamelabel">Назва</string>
|
||||
<string name="tablecommentlabel">Примітка</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">Додати поле</string>
|
||||
<string name="editrow">Змінити поле</string>
|
||||
<string name="removerow">Вилучити поле</string>
|
||||
<string name="uprow">Вгору</string>
|
||||
<string name="downrow">Вниз</string>
|
||||
<string name="newrow">нове поле</string>
|
||||
<string name="foreigncreate">Створити зовнішній ключ</string>
|
||||
<string name="foreignpending">клацніть по цільовій таблиці</string>
|
||||
<string name="foreignconnect">Приєднати зовнішній ключ</string>
|
||||
<string name="foreignconnectpending">клацніть по цільовому рядку</string>
|
||||
<string name="foreigndisconnect">Вилучити зовнішній ключ</string>
|
||||
<string name="confirmtable">Справді вилучити таблицю</string>
|
||||
<string name="confirmrow">Справді знищити поле</string>
|
||||
|
||||
<!-- row edit -->
|
||||
<string name="name">Назва</string>
|
||||
<string name="type">Тип</string>
|
||||
<string name="size">Розмір</string>
|
||||
<string name="def">Стандартно</string>
|
||||
<string name="notnull">NOT NULL</string>
|
||||
<string name="null">NULL</string>
|
||||
<string name="ai">Автоінкремент</string>
|
||||
<string name="comment">Змінити примітку</string>
|
||||
<string name="commenttext">Ввід примітки для цього поля</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">Гаразд</string>
|
||||
<string name="windowcancel">Скасувати</string>
|
||||
<string name="throbber">Зачекайте...</string>
|
||||
<string name="options">Параметри</string>
|
||||
<string name="language">Мова</string>
|
||||
<string name="db">База даних для нових дизайнів</string>
|
||||
<string name="optionsnotice">Ряд параметрів будуть застосовані лише після повного перезавантаження сторінки. Для задіяння параметрів повинні бути увімкнені реп'яшки (файли cookie).</string>
|
||||
<string name="snap">Відстань фіксації таблиць</string>
|
||||
<string name="optionsnapnotice">В пікселах, 0 = вимкнути фіксацію</string>
|
||||
<string name="pattern">Шаблон для зовнішніх назв</string>
|
||||
<string name="optionpatternnotice">%T = первинна таблиця, %R = первинний ключ, %t = зовнішня таблиця</string>
|
||||
<string name="hide">Приховувати з'єднання підчас переміщення таблиць?</string>
|
||||
<string name="vector">Креслити плавні з'єднання (якщо підтримується переглядачем)?</string>
|
||||
<string name="showsize">Показувати розмір поля в дизайні таблиці?</string>
|
||||
<string name="showtype">Показувати тип даних поля в дизайні таблиці?</string>
|
||||
<string name="style">Стиль</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Ключі</string>
|
||||
<string name="keyslistlabel">Ключі таблиці "%s"</string>
|
||||
<string name="keytypelabel">Тип:</string>
|
||||
<string name="keynamelabel">Назва:</string>
|
||||
<string name="keyfieldslabel">Поля ключа</string>
|
||||
<string name="keyavaillabel">Доступні поля</string>
|
||||
<string name="keyedit">Зміна ключа</string>
|
||||
<string name="keyadd">Додати ключ</string>
|
||||
<string name="keyremove">Вилучити ключ</string>
|
||||
|
||||
<!-- io -->
|
||||
<string name="saveload">Зберегти / Завантажити</string>
|
||||
<string name="empty">Прошу вставити дані XML у текстову область нижче і спробувати повторно.</string>
|
||||
<string name="client">Клієнт</string>
|
||||
<string name="server">Сервер</string>
|
||||
<string name="output">Ввід / Вивід</string>
|
||||
<string name="clientsave">Зберегти XML</string>
|
||||
<string name="clientload">Завантажити XML</string>
|
||||
<string name="clientlocalsave">Зберегти в переглядачі</string>
|
||||
<string name="clientlocalload">Завантажити з переглядача</string>
|
||||
<string name="clientlocallist">Список з переглядача</string>
|
||||
<string name="dropboxsave">Зберегти у Dropbox</string>
|
||||
<string name="dropboxload">Завантажити з Dropbox'а</string>
|
||||
<string name="dropboxlist">Список із Dropbox'а</string>
|
||||
<string name="clientsql">Згенерувати SQL</string>
|
||||
<string name="backendlabel">Серверна частина:</string>
|
||||
<string name="serversave">Зберегти</string>
|
||||
<string name="quicksave">Швидке збереження</string>
|
||||
<string name="serverload">Завантажити</string>
|
||||
<string name="serverlist">Список елементів</string>
|
||||
<string name="serverimport">Імпортувати з БД</string>
|
||||
<string name="serverloadprompt">Ввести ключове слово, під яким був збережений Ваш дизайн:</string>
|
||||
<string name="serversaveprompt">Ввести ключове слово, під яким Ваш дизайн буде збережений:</string>
|
||||
<string name="serverimportprompt">Ввести назву БД, яка імпортуватиметься:</string>
|
||||
<string name="httpresponse">Відповідь від сервера</string>
|
||||
<string name="http201">Збережено</string>
|
||||
<string name="http404">Не знайдено</string>
|
||||
<string name="http500">Внутрішня помилка сервера</string>
|
||||
<string name="http501">Не реалізовано</string>
|
||||
<string name="http503">Сервіс недоступний</string>
|
||||
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">Помилка XML</string>
|
||||
<string name="docs">Документація</string>
|
||||
|
||||
</locale>
|
||||
@@ -1,98 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale>
|
||||
<!-- table management -->
|
||||
<string name="addtable">添加表</string>
|
||||
<string name="edittable">修改表</string>
|
||||
<string name="removetable">移除表</string>
|
||||
<string name="aligntables">重组表格位置</string>
|
||||
<string name="cleartables">删除所有表</string>
|
||||
<string name="confirmall">真的要删除所有表么</string>
|
||||
<string name="newtable">表名称</string>
|
||||
<string name="addpending">放置表格……</string>
|
||||
<string name="tablenamelabel">表名</string>
|
||||
<string name="tablecommentlabel">注释</string>
|
||||
<!-- table management -->
|
||||
<string name="addtable">添加表</string>
|
||||
<string name="edittable">修改表</string>
|
||||
<string name="removetable">移除表</string>
|
||||
<string name="aligntables">重组表格位置</string>
|
||||
<string name="cleartables">删除所有表</string>
|
||||
<string name="confirmall">真的要删除所有表么</string>
|
||||
<string name="newtable">表名称</string>
|
||||
<string name="addpending">放置表格……</string>
|
||||
<string name="tablenamelabel">表名</string>
|
||||
<string name="tablecommentlabel">注释</string>
|
||||
|
||||
<!-- row management -->
|
||||
<string name="addrow">添加列</string>
|
||||
<string name="editrow">修改列</string>
|
||||
<string name="removerow">删除列</string>
|
||||
<string name="uprow">上移</string>
|
||||
<string name="downrow">下移</string>
|
||||
<string name="newrow">newfield</string>
|
||||
<string name="foreigncreate">创建外连表格列</string>
|
||||
<string name="foreignpending">点击选择目标表</string>
|
||||
<string name="foreignconnect">连接到外部列</string>
|
||||
<string name="foreignconnectpending">点击选择目标列</string>
|
||||
<string name="foreigndisconnect">断开外部连接</string>
|
||||
<string name="confirmtable">真的删除表么</string>
|
||||
<string name="confirmrow">真的删除列么</string>
|
||||
<!-- row management -->
|
||||
<string name="addrow">添加列</string>
|
||||
<string name="editrow">修改列</string>
|
||||
<string name="removerow">删除列</string>
|
||||
<string name="uprow">上移</string>
|
||||
<string name="downrow">下移</string>
|
||||
<string name="newrow">newfield</string>
|
||||
<string name="foreigncreate">创建外连表格列</string>
|
||||
<string name="foreignpending">点击选择目标表</string>
|
||||
<string name="foreignconnect">连接到外部列</string>
|
||||
<string name="foreignconnectpending">点击选择目标列</string>
|
||||
<string name="foreigndisconnect">断开外部连接</string>
|
||||
<string name="confirmtable">真的删除表么</string>
|
||||
<string name="confirmrow">真的删除列么</string>
|
||||
|
||||
<!-- row edit -->
|
||||
<string name="name">列名</string>
|
||||
<string name="type">类型</string>
|
||||
<string name="size">大小</string>
|
||||
<string name="def">默认</string>
|
||||
<string name="notnull">不能为空</string>
|
||||
<string name="null">可留空</string>
|
||||
<string name="ai">自增长</string>
|
||||
<string name="comment">改备注</string>
|
||||
<string name="commenttext">输入此列备注</string>
|
||||
<!-- row edit -->
|
||||
<string name="name">列名</string>
|
||||
<string name="type">类型</string>
|
||||
<string name="size">大小</string>
|
||||
<string name="def">默认</string>
|
||||
<string name="notnull">不能为空</string>
|
||||
<string name="null">可留空</string>
|
||||
<string name="ai">自增长</string>
|
||||
<string name="comment">改备注</string>
|
||||
<string name="commenttext">输入此列备注</string>
|
||||
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">搞定</string>
|
||||
<string name="windowcancel">不要了</string>
|
||||
<string name="throbber">请等待...</string>
|
||||
<string name="options">选项设置</string>
|
||||
<string name="language">语言</string>
|
||||
<string name="db">新建的数据库设为:</string>
|
||||
<string name="optionsnotice">有些属性需要刷新页面后才能起作用,所以,浏览器的Cookies必须启用。</string>
|
||||
<string name="snap">表格捕捉距离</string>
|
||||
<string name="optionsnapnotice">像素, 0 = 关闭捕捉</string>
|
||||
<string name="pattern">外连名称规则</string>
|
||||
<string name="optionpatternnotice">%T = 主表, %R = 主键, %t = 外连表</string>
|
||||
<string name="hide">在表格移动时不显示连接?</string>
|
||||
<string name="vector">绘制平滑的连接 (如果浏览器支持)?</string>
|
||||
<!-- windows & options -->
|
||||
<string name="windowok">搞定</string>
|
||||
<string name="windowcancel">不要了</string>
|
||||
<string name="throbber">请等待...</string>
|
||||
<string name="options">选项设置</string>
|
||||
<string name="language">语言</string>
|
||||
<string name="db">新建的数据库设为:</string>
|
||||
<string name="optionsnotice">有些属性需要刷新页面后才能起作用,所以,浏览器的Cookies必须启用。</string>
|
||||
<string name="snap">表格捕捉距离</string>
|
||||
<string name="optionsnapnotice">像素, 0 = 关闭捕捉</string>
|
||||
<string name="pattern">外连名称规则</string>
|
||||
<string name="optionpatternnotice">%T = 主表, %R = 主键, %t = 外连表</string>
|
||||
<string name="hide">在表格移动时不显示连接?</string>
|
||||
<string name="vector">绘制平滑的连接 (如果浏览器支持)?</string>
|
||||
<string name="showsize">设计表格时显示字段大小?</string>
|
||||
<string name="showtype">设计表格时显示字段数据类型?</string>
|
||||
<string name="showtype">设计表格时显示字段数据类型?</string>
|
||||
<string name="style">样式</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">设置表键</string>
|
||||
<string name="keyslistlabel">在 "%s" 表中可用列属性</string>
|
||||
<string name="keytypelabel">类型:</string>
|
||||
<string name="keynamelabel">属性名称:</string>
|
||||
<string name="keyfieldslabel">此属性中的列</string>
|
||||
<string name="keyavaillabel">可用列</string>
|
||||
<string name="keyedit">修改属性</string>
|
||||
<string name="keyadd">添加属性</string>
|
||||
<string name="keyremove">删除属性</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">设置表键</string>
|
||||
<string name="keyslistlabel">在 "%s" 表中可用列属性</string>
|
||||
<string name="keytypelabel">类型:</string>
|
||||
<string name="keynamelabel">属性名称:</string>
|
||||
<string name="keyfieldslabel">此属性中的列</string>
|
||||
<string name="keyavaillabel">可用列</string>
|
||||
<string name="keyedit">修改属性</string>
|
||||
<string name="keyadd">添加属性</string>
|
||||
<string name="keyremove">删除属性</string>
|
||||
|
||||
<!-- io -->
|
||||
<!-- io -->
|
||||
<string name="login">登录</string>
|
||||
<string name="logout">注销</string>
|
||||
<string name="saveload">保存 / 载入</string>
|
||||
<string name="empty">请先粘帖一个XML文件内容到文本框中,然后再导入。</string>
|
||||
<string name="clientsave">保存为XML</string>
|
||||
<string name="clientload">载入XML</string>
|
||||
<string name="clientsql">传化为数据库脚本</string>
|
||||
<string name="backendlabel">服务后台:</string>
|
||||
<string name="serversave">保存</string>
|
||||
<string name="serverload">载入</string>
|
||||
<string name="serverlist">显示清单</string>
|
||||
<string name="quicksave">快速保存</string>
|
||||
<string name="serverimport">从数据库中导入</string>
|
||||
<string name="serverloadprompt">输入你所保存的名字:</string>
|
||||
<string name="serversaveprompt">输入所要保存的名字:</string>
|
||||
<string name="serverimportprompt">输入所要导入的数据库名称:</string>
|
||||
<string name="httpresponse">服务器反馈</string>
|
||||
<string name="http201">已存</string>
|
||||
<string name="http404">找不到</string>
|
||||
<string name="http500">网络服务错误</string>
|
||||
<string name="http501">未执行</string>
|
||||
<string name="http503">服务暂不可用</string>
|
||||
<string name="saveload">保存 / 载入</string>
|
||||
<string name="empty">请先粘帖一个XML文件内容到文本框中,然后再导入。</string>
|
||||
<string name="client">客户端</string>
|
||||
<string name="server">服务端</string>
|
||||
<string name="output">输入 / 输出</string>
|
||||
<string name="clientsave">保存为XML</string>
|
||||
<string name="clientload">载入XML</string>
|
||||
<string name="clientsql">传化为数据库脚本</string>
|
||||
<string name="backendlabel">服务后台:</string>
|
||||
<string name="serversave">保存</string>
|
||||
<string name="serverload">载入</string>
|
||||
<string name="serverlist">显示清单</string>
|
||||
<string name="quicksave">快速保存</string>
|
||||
<string name="serverimport">从数据库中导入</string>
|
||||
<string name="serverloadprompt">输入你所保存的名字:</string>
|
||||
<string name="serversaveprompt">输入所要保存的名字:</string>
|
||||
<string name="serverimportprompt">输入所要导入的数据库名称:</string>
|
||||
<string name="httpresponse">服务器反馈</string>
|
||||
<string name="http201">已存</string>
|
||||
<string name="http404">找不到</string>
|
||||
<string name="http500">网络服务错误</string>
|
||||
<string name="http501">未执行</string>
|
||||
<string name="http503">服务暂不可用</string>
|
||||
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XML 错误</string>
|
||||
<string name="docs">文档</string>
|
||||
<!-- misc -->
|
||||
<string name="xmlerror">XML 错误</string>
|
||||
<string name="docs">文档</string>
|
||||
|
||||
</locale>
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
v\:* {
|
||||
behavior: url(#default#VML);
|
||||
}
|
||||
|
||||
#bar {
|
||||
position: absolute;
|
||||
right: auto;
|
||||
left: expression(eval(document.documentElement.scrollLeft)+document.documentElement.clientWidth-eval(this.offsetWidth));
|
||||
top: expression(eval(document.documentElement.scrollTop));
|
||||
}
|
||||
|
||||
#bar .shadow-corner {
|
||||
background-image: none;
|
||||
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/bar_corner.png', sizingMethod='crop');
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#bar .shadow-left {
|
||||
background-image: none;
|
||||
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/bar_left.png', sizingMethod='crop');
|
||||
height: expression(eval(this.parentNode.offsetHeight));
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#bar .shadow-bottom {
|
||||
background-image: none;
|
||||
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/bar_bottom.png', sizingMethod='crop');
|
||||
width: expression(eval(this.parentNode.offsetWidth));
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.table .shadow-corner {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.table .shadow-right {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.table .shadow-bottom {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
#minimap {
|
||||
filter: alpha(opacity=90);
|
||||
position: absolute;
|
||||
right: auto;
|
||||
left: expression(eval(document.documentElement.scrollLeft)+document.documentElement.clientWidth-eval(this.offsetWidth));
|
||||
top: expression(eval(document.documentElement.scrollTop)+document.documentElement.clientHeight-eval(this.offsetHeight));
|
||||
}
|
||||
|
||||
#background {
|
||||
filter: alpha(opacity=50);
|
||||
}
|
||||
|
||||
#keys, #opts {
|
||||
width: expression(eval(document.documentElement.clientWidth)/2);
|
||||
}
|
||||
|
||||
#rubberband {
|
||||
filter: alpha(opacity=50);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
v\:* {
|
||||
behavior: url(#default#VML);
|
||||
}
|
||||
|
||||
#minimap {
|
||||
filter: alpha(opacity=90);
|
||||
}
|
||||
|
||||
#background {
|
||||
filter: alpha(opacity=50);
|
||||
}
|
||||
|
||||
#keys, #opts {
|
||||
width: expression(eval(document.documentElement.clientWidth)/2);
|
||||
}
|
||||
|
||||
#rubberband {
|
||||
filter: alpha(opacity=50);
|
||||
}
|
||||
@@ -0,0 +1,595 @@
|
||||
/* Generic styles */
|
||||
|
||||
body {
|
||||
font-family: verdana, sans-serif;
|
||||
font-size: 12px;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
background: #FFF;
|
||||
font-weight: 400;
|
||||
line-height: 1.429;
|
||||
color: rgba(0, 0, 0, .87);
|
||||
visibility: hidden;
|
||||
-moz-user-select: -moz-none;
|
||||
-khtml-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
input[type=button] {
|
||||
font-family: verdana, sans-serif;
|
||||
-webkit-appearance: button;
|
||||
cursor: pointer;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
line-height: 18px;
|
||||
text-transform: uppercase;
|
||||
color: rgba(0, 0, 0, .87);
|
||||
background-color: #FFF;
|
||||
display: inline-block;
|
||||
height: 36px;
|
||||
padding: 0 26px;
|
||||
margin-top: 6px;
|
||||
margin-bottom: 6px;
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
cursor: pointer;
|
||||
-ms-touch-action: manipulation;
|
||||
touch-action: manipulation;
|
||||
background-image: none;
|
||||
text-align: center;
|
||||
line-height: 36px;
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
font-size: 14px;
|
||||
letter-spacing: .03em;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
input[type=text] {
|
||||
font-family: verdana, sans-serif;
|
||||
height: 32px;
|
||||
display: block;
|
||||
background-color: transparent;
|
||||
color: rgba(0, 0, 0, .87);
|
||||
border: none;
|
||||
border-bottom-color: currentcolor;
|
||||
border-bottom-style: none;
|
||||
border-bottom-width: medium;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, .26);
|
||||
outline: 0;
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
border-radius: 0;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
textarea {
|
||||
min-width: 500px;
|
||||
font-family: verdana, sans-serif;
|
||||
min-height: 64px;
|
||||
display: block;
|
||||
background-color: transparent;
|
||||
color: rgba(0, 0, 0, .87);
|
||||
border: none;
|
||||
border-bottom-color: currentcolor;
|
||||
border-bottom-style: none;
|
||||
border-bottom-width: medium;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, .26);
|
||||
outline: 0;
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
border-radius: 0;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
select {
|
||||
font-family: verdana, sans-serif;
|
||||
display: block;
|
||||
height: 32px;
|
||||
width: 100%;
|
||||
appearance: none;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
outline: 0;
|
||||
border: none;
|
||||
border-bottom-color: currentcolor;
|
||||
border-bottom-style: none;
|
||||
border-bottom-width: medium;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, .26);
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNiIgd2lkdGg9IjEwIj48cG9seWdvbiBwb2ludHM9IjAsMCAxMCwwIDUsNiIgc3R5bGU9ImZpbGw6cmdiYSgwLDAsMCwuMjQpOyIvPjwvc3ZnPg==);
|
||||
background-repeat: no-repeat;
|
||||
background-position: right center;
|
||||
cursor: pointer;
|
||||
color: rgba(0, 0, 0, .87);
|
||||
font-size: 16px;
|
||||
padding: 0 25px 0 0;
|
||||
}
|
||||
|
||||
textarea:focus, select:focus, input[type=text]:focus {
|
||||
border-color: #2196F3;
|
||||
border-width: 2px;
|
||||
}
|
||||
|
||||
select optgroup {
|
||||
color: rgba(0, 0, 0, .54);
|
||||
font-size: .9em;
|
||||
background: white !important;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
legend {
|
||||
text-align: left;
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: 10px;
|
||||
font-size: 21px;
|
||||
color: rgba(0, 0, 0, .87);
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
border: none;
|
||||
padding: 0px;
|
||||
margin: 0px 0px 10px 0px;
|
||||
}
|
||||
|
||||
label {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
label, input, select {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Area */
|
||||
|
||||
#area {
|
||||
position: relative;
|
||||
background: transparent url(../images/back_dim.png);
|
||||
width: 3000px;
|
||||
height: 3000px;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
#rubberband {
|
||||
position: absolute;
|
||||
border: .2px solid #FF4081;
|
||||
background: rgba(255, 64, 129, 0.5);
|
||||
opacity: 0.5;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#background {
|
||||
position: absolute;
|
||||
background-color: #000;
|
||||
opacity: 0.5;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/* Main menu */
|
||||
|
||||
#controls {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
#bar {
|
||||
position: fixed;
|
||||
transition: all .2s ease-in-out;
|
||||
right: 4px;
|
||||
top: 0px;
|
||||
width: 190px;
|
||||
margin: 0px 0px 20px 0px;
|
||||
padding: 0px;
|
||||
background-color: rgb(255, 255, 255);
|
||||
text-align: center;
|
||||
border-radius: 0px;
|
||||
box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px 0px, rgba(0, 0, 0, 0.23) 0px 3px 6px 0px;
|
||||
box-sizing: border-box;
|
||||
max-height: 600px;
|
||||
}
|
||||
|
||||
#bar input {
|
||||
transition: all .2s ease-in-out;
|
||||
border-radius: 2px;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin: auto auto 3px auto;
|
||||
padding: 2px;
|
||||
line-height: 1.3;
|
||||
opacity: .7;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
#bar input:hover {
|
||||
background-color: #de2665;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#bar input:disabled {
|
||||
cursor: not-allowed;
|
||||
pointer-events: none;
|
||||
opacity: .4;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#bar input.small {
|
||||
width: 45%;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#bar hr {
|
||||
margin: 8px;
|
||||
background-color: #ddd;
|
||||
height: 1px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#toggle {
|
||||
margin-bottom: 5px;
|
||||
cursor: pointer;
|
||||
transition: all .2s ease-in-out;
|
||||
border-radius: 2px;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
height: 22px;
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
#toggle:hover {
|
||||
background-color: #de2665;
|
||||
}
|
||||
|
||||
#toggle.on {
|
||||
background-image: url(../images/up_2_black.png);
|
||||
}
|
||||
|
||||
#toggle.on:hover {
|
||||
background-image: url(../images/up_2_white.png);
|
||||
}
|
||||
|
||||
#toggle.off {
|
||||
background-image: url(../images/down_2_black.png);
|
||||
}
|
||||
|
||||
#toggle.off:hover {
|
||||
background-image: url(../images/down_2_white.png);
|
||||
}
|
||||
|
||||
/* Minimap */
|
||||
|
||||
#minimap {
|
||||
position: fixed;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
right: 5px;
|
||||
bottom: 5px;
|
||||
background-color: #fff;
|
||||
opacity: 0.9;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .24);
|
||||
}
|
||||
|
||||
.mini {
|
||||
position: absolute;
|
||||
background-color: #ff8fb5;
|
||||
font-size: 1px;
|
||||
line-height: 1px;
|
||||
}
|
||||
|
||||
.mini_selected {
|
||||
background-color: #de2665;
|
||||
}
|
||||
|
||||
.port {
|
||||
position: absolute;
|
||||
transition: border 0.2s ease-in-out;
|
||||
border: 2px solid rgba(0, 0, 0, .3);
|
||||
}
|
||||
|
||||
#minimap:hover .port {
|
||||
border: 2px solid rgba(0, 0, 0, .8);
|
||||
}
|
||||
|
||||
/* Tables */
|
||||
|
||||
.table {
|
||||
position: absolute;
|
||||
padding: 0 6px 6px 6px;
|
||||
cursor: pointer;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 0;
|
||||
background-color: #FFF;
|
||||
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .16), 0 0 2px 0 rgba(0, 0, 0, .12);
|
||||
}
|
||||
|
||||
.table table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.table.selected {
|
||||
border: 1px solid #FF4081;
|
||||
}
|
||||
|
||||
.table thead .title {
|
||||
text-align: center;
|
||||
padding: 6px 30px;
|
||||
}
|
||||
|
||||
.table tbody {
|
||||
border-right: 4px solid transparent;
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
.table tbody td {
|
||||
padding: 3px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.table tbody.expanded {
|
||||
border-right: 6px solid rgba(0, 0, 0, .12);
|
||||
background-color: whitesmoke !important;
|
||||
}
|
||||
|
||||
.table tbody .selected {
|
||||
font-weight: bold;
|
||||
color: #f00;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.table tbody .title {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.table thead td[title]:not([title=""]):after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
border-color: rgb(125, 178, 221);
|
||||
border-style: solid;
|
||||
border-width: 5px;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent;
|
||||
}
|
||||
|
||||
.table tbody[title]:not(.expanded):not([title=""]) td:last-child:after {
|
||||
content: '';
|
||||
position: relative;
|
||||
border-color: rgb(125, 178, 221);
|
||||
border-style: solid;
|
||||
border-width: 6px;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent;
|
||||
border-top-color: transparent;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.primary {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.key {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.primary.key {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.typehint {
|
||||
font-size: 80%;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.comment {
|
||||
font-size: 80%;
|
||||
font-weight: normal;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
#commentbtn {
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 2px 2px rgba(0, 0, 0, .2);
|
||||
}
|
||||
|
||||
.adding {
|
||||
cursor: crosshair;
|
||||
}
|
||||
|
||||
.relation {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#tablename, #tablecomment {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* Window */
|
||||
|
||||
#window {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 10px 20px rgba(0, 0, 0, .19), 0 6px 6px rgba(0, 0, 0, .23);
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
#windowtitle {
|
||||
font-size: x-large;
|
||||
margin: 15px 15px 24px 15px;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
#windowcontent {
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
#windowok {
|
||||
color: #FF4081;
|
||||
}
|
||||
|
||||
#windowok, #windowcancel {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#windowok:hover, #windowcancel:hover {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
#throbber {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 3px;
|
||||
}
|
||||
|
||||
/* Save / Load */
|
||||
|
||||
#io {
|
||||
min-width: 860px;
|
||||
}
|
||||
|
||||
#io hr {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#io table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#io input[type=button] {
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 2px 2px rgba(0, 0, 0, .2);
|
||||
}
|
||||
|
||||
#io input[type=button]:active {
|
||||
background-color: #f2f2f2;
|
||||
transition: all .2s ease-out;
|
||||
}
|
||||
|
||||
#io #clientsql {
|
||||
color: #FFF;
|
||||
background-color: #FF4081;
|
||||
}
|
||||
|
||||
#io #clientsql:hover {
|
||||
transition: all .2s ease-in-out;
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 2px 2px rgba(0, 0, 0, .2);
|
||||
background-color: #ff5a92;
|
||||
}
|
||||
|
||||
#textarea {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
font-size: small;
|
||||
font-family: "Lucida Console", Monaco, monospace;
|
||||
}
|
||||
|
||||
/* Options */
|
||||
|
||||
#opts {
|
||||
width: 700px;
|
||||
}
|
||||
|
||||
#opts td {
|
||||
padding-top: 15px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#opts #optionsnotice {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
#opts hr {
|
||||
background-color: #ddd;
|
||||
height: 1px;
|
||||
border: none;
|
||||
margin: 25px 0px 25px 0px;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 85%;
|
||||
}
|
||||
|
||||
/* Keys */
|
||||
|
||||
#keys {
|
||||
white-space: nowrap;
|
||||
padding: 0px 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#keys hr {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#keys table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#keys table td {
|
||||
width: 42%;
|
||||
}
|
||||
|
||||
#keys table td+td {
|
||||
width: 16%;
|
||||
}
|
||||
|
||||
#keys table td+td+td {
|
||||
width: 42%;
|
||||
}
|
||||
|
||||
#keyadd {
|
||||
margin: 15px;
|
||||
color: #FFF;
|
||||
background-color: #2196F3;
|
||||
}
|
||||
|
||||
#keyadd:hover {
|
||||
transition: all .2s ease-in-out;
|
||||
background-color: #39a1f4;
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 2px 2px rgba(0, 0, 0, .2);
|
||||
}
|
||||
|
||||
#keyremove {
|
||||
margin: 15px;
|
||||
color: #FFF;
|
||||
background-color: #F44336;
|
||||
}
|
||||
|
||||
#keyremove:hover {
|
||||
transition: all .2s ease-in-out;
|
||||
background-color: #f55a4e;
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 2px 2px rgba(0, 0, 0, .2);
|
||||
}
|
||||
|
||||
#keyleft, #keyright {
|
||||
height: auto;
|
||||
line-height: normal;
|
||||
box-shadow: none;
|
||||
padding: 3px;
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 2px 2px rgba(0, 0, 0, .2);
|
||||
}
|
||||
|
||||
#keyfields, #keyavail {
|
||||
height: auto;
|
||||
background-image: none;
|
||||
font-size: small;
|
||||
border: 1px solid rgba(0, 0, 0, .26);
|
||||
padding: 0px;
|
||||
}
|
||||
@@ -0,0 +1,285 @@
|
||||
body {
|
||||
font-family: verdana, sans serif;
|
||||
font-size: small;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
background: #FFF;
|
||||
visibility: hidden;
|
||||
-moz-user-select: -moz-none;
|
||||
-khtml-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#area {
|
||||
position: relative;
|
||||
background: transparent url(../images/back.png);
|
||||
width: 3000px;
|
||||
height: 3000px;
|
||||
}
|
||||
|
||||
#controls {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
#bar {
|
||||
text-align: center;
|
||||
background-color: #ccc;
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
width: 150px;
|
||||
padding: 0px 5px 5px;
|
||||
-moz-box-shadow: -4px 4px 8px #888;
|
||||
/* FF 3.5+ */
|
||||
-webkit-box-shadow: -4px 4px 8px #888;
|
||||
/* Safari 3.0+, Chrome */
|
||||
box-shadow: -4px 4px 8px #888;
|
||||
/* Opera 10.5, IE 9.0 */
|
||||
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=215, Color='#888888');
|
||||
/* IE 6, IE 7 */
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=215, Color='#888888')";
|
||||
/* IE 8 */
|
||||
}
|
||||
|
||||
#bar input {
|
||||
display: block;
|
||||
width: 90%;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
#bar input.small {
|
||||
width: 45%;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#toggle {
|
||||
padding: 5px 0px;
|
||||
margin-bottom: 5px;
|
||||
cursor: pointer;
|
||||
background-position: 50% 5px;
|
||||
background-repeat: no-repeat;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#toggle:hover {
|
||||
background-color: #bbb;
|
||||
}
|
||||
|
||||
#toggle.on {
|
||||
background-image: url(../images/up.gif);
|
||||
}
|
||||
|
||||
#toggle.off {
|
||||
background-image: url(../images/down.gif);
|
||||
}
|
||||
|
||||
#minimap {
|
||||
position: fixed;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #000;
|
||||
opacity: 0.9;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mini {
|
||||
position: absolute;
|
||||
border: 1px solid #000;
|
||||
background-color: #eea;
|
||||
font-size: 1px;
|
||||
line-height: 1px;
|
||||
}
|
||||
|
||||
.mini_selected {
|
||||
background-color: #f85;
|
||||
}
|
||||
|
||||
.port {
|
||||
position: absolute;
|
||||
border: 2px solid #f00;
|
||||
}
|
||||
|
||||
.table {
|
||||
position: absolute;
|
||||
border: 1px solid #000;
|
||||
background-color: #ddd;
|
||||
cursor: pointer;
|
||||
-moz-box-shadow: 4px 4px 8px #888;
|
||||
/* FF 3.5+ */
|
||||
-webkit-box-shadow: 4px 4px 8px #888;
|
||||
/* Safari 3.0+, Chrome */
|
||||
box-shadow: 4px 4px 8px #888;
|
||||
/* Opera 10.5, IE 9.0 */
|
||||
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=135, Color='#888888');
|
||||
/* IE 6, IE 7 */
|
||||
-ms-filter: progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=135, Color='#888888');
|
||||
/* IE 8 */
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.table table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.table.selected {
|
||||
border: 2px solid #000;
|
||||
}
|
||||
|
||||
.table thead .title {
|
||||
text-align: center;
|
||||
padding: 3px 30px;
|
||||
}
|
||||
|
||||
.table tbody {
|
||||
border-top: 1px dotted #888;
|
||||
}
|
||||
|
||||
.table tbody td {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.table tbody .selected {
|
||||
font-weight: bold;
|
||||
color: #f00;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.table tbody .title {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.table thead td[title]:not([title=""]):after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
border-color: royalblue;
|
||||
border-style: solid;
|
||||
border-width: 5px;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent;
|
||||
}
|
||||
|
||||
.table tbody td {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.table tbody[title]:not(.expanded):not([title=""]) td:last-child:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
border-color: royalblue;
|
||||
border-style: solid;
|
||||
border-width: 5px;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent;
|
||||
}
|
||||
|
||||
.primary {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.key {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.primary.key {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.typehint {
|
||||
font-size: 80%;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.comment {
|
||||
font-size: 80%;
|
||||
font-weight: normal;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
.adding {
|
||||
cursor: crosshair;
|
||||
}
|
||||
|
||||
.relation {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#background {
|
||||
position: absolute;
|
||||
background-color: #000;
|
||||
opacity: 0.5;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#window {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
background-color: #fff;
|
||||
border: 6px double #333;
|
||||
}
|
||||
|
||||
#windowtitle {
|
||||
border-bottom: 2px solid #333;
|
||||
padding: 2px;
|
||||
padding-left: 1em;
|
||||
font-weight: bold;
|
||||
background-color: rgb(238, 238, 170);
|
||||
}
|
||||
|
||||
#windowcontent {
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
#windowok, #windowcancel {
|
||||
margin: 0em 1em 1em;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 85%;
|
||||
}
|
||||
|
||||
#textarea {
|
||||
width: 650px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
#opts {
|
||||
width: 700px;
|
||||
}
|
||||
|
||||
#keys {
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
legend {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
label, input, select {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#throbber {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 3px;
|
||||
}
|
||||
|
||||
#rubberband {
|
||||
position: absolute;
|
||||
border: 1px solid #000;
|
||||
background: #888;
|
||||
opacity: 0.5;
|
||||
visibility: hidden;
|
||||
}
|
||||
@@ -1,23 +1,22 @@
|
||||
#bar, #background, #minimap {
|
||||
display: none;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.table {
|
||||
border:1px solid #000000;
|
||||
background-color:none;
|
||||
border: 1px solid #000000;
|
||||
background-color: none;
|
||||
}
|
||||
|
||||
.row {
|
||||
background-color:none;
|
||||
background-color: none;
|
||||
}
|
||||
|
||||
.table .shadow-corner, .shadow-right, .shadow-bottom {
|
||||
display:none;
|
||||
.table .shadow-corner, .shadow-right, .shadow-bottom {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.table_title {
|
||||
font-weight:bold;
|
||||
font-size:115%;
|
||||
background-color:none;
|
||||
font-weight: bold;
|
||||
font-size: 115%;
|
||||
background-color: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,247 +0,0 @@
|
||||
body {
|
||||
font-family: verdana, sans serif;
|
||||
font-size: small;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
background: #FFF;
|
||||
visibility: hidden;
|
||||
-moz-user-select: -moz-none;
|
||||
-khtml-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#area {
|
||||
position: relative;
|
||||
background: transparent url(../images/back.png);
|
||||
width: 2000px;
|
||||
height: 2000px;
|
||||
}
|
||||
|
||||
#controls {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
#bar {
|
||||
text-align: center;
|
||||
background-color: #ccc;
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
width: 150px;
|
||||
padding: 0px 5px 5px;
|
||||
-moz-box-shadow: -4px 4px 8px #888; /* FF 3.5+ */
|
||||
-webkit-box-shadow: -4px 4px 8px #888; /* Safari 3.0+, Chrome */
|
||||
box-shadow: -4px 4px 8px #888; /* Opera 10.5, IE 9.0 */
|
||||
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=215, Color='#888888'); /* IE 6, IE 7 */
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=215, Color='#888888')"; /* IE 8 */
|
||||
}
|
||||
|
||||
#bar input, #bar button {
|
||||
display: block;
|
||||
width: 90%;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
#bar input.small {
|
||||
width: 45%;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#toggle {
|
||||
padding: 5px 0px;
|
||||
margin-bottom: 5px;
|
||||
cursor: pointer;
|
||||
background-position: 50% 5px;
|
||||
background-repeat: no-repeat;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#toggle:hover {
|
||||
background-color: #bbb;
|
||||
}
|
||||
|
||||
#toggle.on {
|
||||
background-image: url(../images/up.gif);
|
||||
}
|
||||
|
||||
#toggle.off {
|
||||
background-image: url(../images/down.gif);
|
||||
}
|
||||
|
||||
#minimap {
|
||||
position: fixed;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #000;
|
||||
opacity: 0.9;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mini {
|
||||
position: absolute;
|
||||
border: 1px solid #000;
|
||||
background-color: #eea;
|
||||
font-size: 1px;
|
||||
line-height: 1px;
|
||||
}
|
||||
|
||||
.mini_selected {
|
||||
background-color: #f85;
|
||||
}
|
||||
|
||||
.port {
|
||||
position: absolute;
|
||||
border: 2px solid #f00;
|
||||
}
|
||||
|
||||
.table {
|
||||
position: absolute;
|
||||
border: 1px solid #000;
|
||||
background-color: #ddd;
|
||||
cursor: pointer;
|
||||
-moz-box-shadow: 4px 4px 8px #888; /* FF 3.5+ */
|
||||
-webkit-box-shadow: 4px 4px 8px #888; /* Safari 3.0+, Chrome */
|
||||
box-shadow: 4px 4px 8px #888; /* Opera 10.5, IE 9.0 */
|
||||
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=135, Color='#888888'); /* IE 6, IE 7 */
|
||||
-ms-filter: progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=135, Color='#888888'); /* IE 8 */
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.table table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.table.selected {
|
||||
border: 2px solid #000;
|
||||
}
|
||||
|
||||
.table thead .title {
|
||||
text-align: center;
|
||||
padding: 3px 30px;
|
||||
}
|
||||
|
||||
.table tbody {
|
||||
border-top: 1px dotted #888;
|
||||
}
|
||||
|
||||
.table tbody td {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.table tbody .selected {
|
||||
font-weight: bold;
|
||||
color: #f00;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.table tbody .title {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.primary {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.key {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.primary.key {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.typehint {
|
||||
font-size: 80%;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.comment {
|
||||
font-size: 80%;
|
||||
font-weight: normal;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
.adding {
|
||||
cursor: crosshair;
|
||||
}
|
||||
|
||||
.relation {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#background {
|
||||
position: absolute;
|
||||
background-color: #000;
|
||||
opacity: 0.5;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#window {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
background-color: #fff;
|
||||
border: 6px double #333;
|
||||
}
|
||||
|
||||
#windowtitle {
|
||||
border-bottom: 2px solid #333;
|
||||
padding: 2px;
|
||||
padding-left: 1em;
|
||||
font-weight: bold;
|
||||
background-color: rgb(238, 238, 170);
|
||||
}
|
||||
|
||||
#windowcontent {
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
#windowok, #windowcancel {
|
||||
margin: 0em 1em 1em;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 85%;
|
||||
}
|
||||
|
||||
#textarea {
|
||||
width: 650px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
#opts {
|
||||
width: 700px;
|
||||
}
|
||||
|
||||
#keys {
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
legend {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
label, input, button, select {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#throbber {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 3px;
|
||||
}
|
||||
|
||||
#rubberband {
|
||||
position: absolute;
|
||||
border: 1px solid #000;
|
||||
background: #888;
|
||||
opacity: 0.5;
|
||||
visibility: hidden;
|
||||
}
|
||||