@ -1,134 +0,0 @@ |
||||
; Script generated by the Inno Setup Script Wizard. |
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! |
||||
|
||||
[Setup] |
||||
; NOTE: The value of AppId uniquely identifies this application. |
||||
; Do not use the same AppId value in installers for other applications. |
||||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) |
||||
AppId={{E63D17F8-D9DA-479D-B9B5-0D101A03703B} |
||||
AppName=Sankore |
||||
AppVerName=Sankore |
||||
AppPublisher=Sankore |
||||
|
||||
AppPublisherURL=http://dev.open-sankore.org |
||||
AppSupportURL=http://dev.open-sankore.org |
||||
AppUpdatesURL=http://dev.open-sankore.org |
||||
|
||||
DefaultDirName={pf}\Sankore |
||||
DefaultGroupName=Sankore |
||||
|
||||
OutputDir=.\install\win32\ |
||||
OutputBaseFilename=Sankore |
||||
SetupIconFile=.\resources\win\uniboard.ico |
||||
Compression=lzma |
||||
SolidCompression=yes |
||||
|
||||
[Languages] |
||||
Name: "en"; MessagesFile: "compiler:Default.isl" |
||||
Name: "fr"; MessagesFile: "compiler:Languages\French.isl" |
||||
Name: "gr"; MessagesFile: "compiler:Languages\German.isl" |
||||
Name: "it"; MessagesFile: "compiler:Languages\Italian.isl" |
||||
Name: "sp"; MessagesFile: "compiler:Languages\Spanish.isl" |
||||
|
||||
[Tasks] |
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked |
||||
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked |
||||
|
||||
[InstallDelete] |
||||
|
||||
Type: files ; Name: "{app}\Sankore.pdb" |
||||
Type: filesandordirs ; Name: "{app}\library" |
||||
Type: filesandordirs ; Name: "{app}\Microsoft.VC90.CRT" |
||||
Type: filesandordirs ; Name: "{app}\plugins" |
||||
Type: filesandordirs ; Name: "{app}\i18n" |
||||
Type: files ; Name: "{app}\*.dll" |
||||
|
||||
[Files] |
||||
Source: "..\Sankore-ThirdParty\microsoft\vcredist_x86.exe"; DestDir:"{tmp}" |
||||
Source: ".\build\win32\release\product\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs |
||||
|
||||
;OpenSSL |
||||
Source: "..\Sankore-ThirdParty\openssl\win32\libeay32.dll"; DestDir:"{app}"; Flags: ignoreversion |
||||
Source: "..\Sankore-ThirdParty\openssl\win32\ssleay32.dll"; DestDir:"{app}"; Flags: ignoreversion |
||||
|
||||
;Qt base dll |
||||
Source: "..\Qt-sankore3.1\lib\QtScript4.dll"; DestDir: "{app}"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\lib\QtGui4.dll"; DestDir: "{app}"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\lib\QtXml4.dll"; DestDir: "{app}"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\lib\QtCore4.dll"; DestDir: "{app}"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\lib\QtWebKit4.dll"; DestDir: "{app}"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\lib\phonon4.dll"; DestDir: "{app}"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\lib\QtNetwork4.dll"; DestDir: "{app}"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\lib\QtSvg4.dll"; DestDir: "{app}"; Flags: ignoreversion |
||||
|
||||
;Qt plugins |
||||
Source: "..\Qt-sankore3.1\plugins\accessible\qtaccessiblecompatwidgets4.dll"; DestDir: "{app}\accessible"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\plugins\accessible\qtaccessiblewidgets4.dll"; DestDir: "{app}\accessible"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\plugins\bearer\qgenericbearer4.dll"; DestDir: "{app}\bearer"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\plugins\bearer\qnativewifibearer4.dll"; DestDir: "{app}\bearer"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\plugins\codecs\qcncodecs4.dll"; DestDir: "{app}\codecs"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\plugins\codecs\qjpcodecs4.dll"; DestDir: "{app}\codecs"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\plugins\codecs\qkrcodecs4.dll"; DestDir: "{app}\codecs"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\plugins\codecs\qtwcodecs4.dll"; DestDir: "{app}\codecs"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\plugins\graphicssystems\qglgraphicssystem4.dll"; DestDir: "{app}\graphicssystems"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\plugins\graphicssystems\qtracegraphicssystem4.dll"; DestDir: "{app}\graphicssystems"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\plugins\iconengines\qsvgicon4.dll"; DestDir: "{app}\iconengines"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\plugins\imageformats\qgif4.dll"; DestDir: "{app}\imageformats"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\plugins\imageformats\qico4.dll"; DestDir: "{app}\imageformats"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\plugins\imageformats\qjpeg4.dll"; DestDir: "{app}\imageformats"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\plugins\imageformats\qmng4.dll"; DestDir: "{app}\imageformats"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\plugins\imageformats\qsvg4.dll"; DestDir: "{app}\imageformats"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\plugins\imageformats\qtiff4.dll"; DestDir: "{app}\imageformats"; Flags: ignoreversion |
||||
Source: "..\Qt-sankore3.1\plugins\phonon_backend\phonon_ds94.dll"; DestDir: "{app}\phonon_backend"; Flags: ignoreversion |
||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files |
||||
|
||||
[Icons] |
||||
Name: "{group}\Sankore"; Filename: "{app}\Sankore.exe" |
||||
Name: "{group}\{cm:UninstallProgram,Sankore}"; Filename: "{uninstallexe}" |
||||
Name: "{commondesktop}\Sankore"; Filename: "{app}\Sankore.exe"; Tasks: desktopicon |
||||
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\Sankore"; Filename: "{app}\Sankore.exe"; Tasks: quicklaunchicon |
||||
;Name: "{group}\Printing Preferences"; Filename: "{app}\properties.exe"; WorkingDir: {app} |
||||
|
||||
[Registry] |
||||
Root: HKCR; Subkey: ".ubz"; ValueType: string; ValueName: ""; ValueData: "SankoreFile"; Flags: uninsdeletevalue |
||||
Root: HKCR; Subkey: "SankoreFile"; ValueType: string; ValueName: ""; ValueData: "Sankore document"; Flags: uninsdeletekey |
||||
Root: HKCR; Subkey: "SankoreFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\Sankore.exe,1" |
||||
Root: HKCR; Subkey: "SankoreFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\Sankore.exe"" ""%1""" |
||||
|
||||
Root: HKLM; Subkey: "SOFTWARE\Sankore"; ValueType: string; ValueName: "Client application"; ValueData: "{app}\Sankore.exe"; Flags: uninsdeletevalue; Check: isProcessorNotX64 |
||||
Root: HKLM; Subkey: "SOFTWARE\Sankore"; ValueType: dword; ValueName: "Transfer mode"; ValueData: "0"; Flags: uninsdeletevalue; Check: isProcessorNotX64 |
||||
Root: HKLM; Subkey: "SOFTWARE\Sankore"; ValueType: dword; ValueName: "EMF: Hide page"; ValueData: "1"; Flags: uninsdeletevalue; Check: isProcessorNotX64 |
||||
Root: HKLM; Subkey: "SOFTWARE\Sankore\Defaults"; ValueType: dword; ValueName: "PDF: Enabled"; ValueData: "1"; Flags: uninsdeletevalue; Check: isProcessorNotX64 |
||||
|
||||
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Internet Explorer\Low Rights\DragDrop\{{E63D17F8-D9DA-479D-B9B5-0D101A03703B}"; ValueType: dword; ValueName: "Policy"; ValueData: "3"; Flags: uninsdeletevalue; Check: isProcessorNotX64 |
||||
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Internet Explorer\Low Rights\DragDrop\{{E63D17F8-D9DA-479D-B9B5-0D101A03703B}"; ValueType: string; ValueName: "AppName"; ValueData: "Sankore.exe"; Flags: uninsdeletevalue; Check: isProcessorNotX64 |
||||
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Internet Explorer\Low Rights\DragDrop\{{E63D17F8-D9DA-479D-B9B5-0D101A03703B}"; ValueType: string; ValueName: "AppPath"; ValueData: "{app}"; Flags: uninsdeletevalue; Check: isProcessorNotX64 |
||||
|
||||
Root: HKLM64; Subkey: "SOFTWARE\Sankore"; ValueType: string; ValueName: "Client application"; ValueData: "{app}\Sankore.exe"; Flags: uninsdeletevalue; Check: isProcessorX64 |
||||
Root: HKLM64; Subkey: "SOFTWARE\Sankore"; ValueType: dword; ValueName: "Transfer mode"; ValueData: "0"; Flags: uninsdeletevalue; Check: isProcessorX64 |
||||
Root: HKLM64; Subkey: "SOFTWARE\Sankore"; ValueType: dword; ValueName: "EMF: Hide page"; ValueData: "1"; Flags: uninsdeletevalue; Check: isProcessorX64 |
||||
Root: HKLM64; Subkey: "SOFTWARE\Sankore\Defaults"; ValueType: dword; ValueName: "PDF: Enabled"; ValueData: "1"; Flags: uninsdeletevalue; Check: isProcessorX64 |
||||
|
||||
Root: HKLM64; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Low Rights\DragDrop\{{E63D17F8-D9DA-479D-B9B5-0D101A03703B}"; ValueType: dword; ValueName: "Policy"; ValueData: "3"; Flags: uninsdeletevalue; Check: isProcessorX64 |
||||
Root: HKLM64; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Low Rights\DragDrop\{{E63D17F8-D9DA-479D-B9B5-0D101A03703B}"; ValueType: string; ValueName: "AppName"; ValueData: "Sankore.exe"; Flags: uninsdeletevalue; Check: isProcessorX64 |
||||
Root: HKLM64; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Low Rights\DragDrop\{{E63D17F8-D9DA-479D-B9B5-0D101A03703B}"; ValueType: string; ValueName: "AppPath"; ValueData: "{app}"; Flags: uninsdeletevalue; Check: isProcessorX64 |
||||
|
||||
[Run] |
||||
Filename: "{tmp}\vcredist_x86.exe";WorkingDir:"{tmp}" |
||||
Filename: "{app}\Sankore.exe"; Description: "{cm:LaunchProgram,Sankore}"; Flags: nowait postinstall |
||||
|
||||
[UninstallDelete] |
||||
; cleanup and delete whole installation directory |
||||
Name: {app}; Type: filesandordirs |
||||
|
||||
[Code] |
||||
function isProcessorX64: Boolean; |
||||
begin |
||||
Result := (ProcessorArchitecture = paX64); |
||||
end; |
||||
|
||||
function isProcessorNotX64: Boolean; |
||||
begin |
||||
Result := not isProcessorX64; |
||||
end; |
||||
|
@ -0,0 +1,71 @@ |
||||
REM -------------------------------------------------------------------- |
||||
REM This program is free software: you can redistribute it and/or modify |
||||
REM it under the terms of the GNU General Public License as published by |
||||
REM the Free Software Foundation, either version 3 of the License, or |
||||
REM (at your option) any later version. |
||||
REM |
||||
REM This program is distributed in the hope that it will be useful, |
||||
REM but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
REM GNU General Public License for more details. |
||||
REM |
||||
REM You should have received a copy of the GNU General Public License |
||||
REM along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
REM --------------------------------------------------------------------- |
||||
|
||||
set QT_DIR=..\Qt-sankore3.1 |
||||
set QT_BIN=%QT_DIR%\bin |
||||
|
||||
set PROGRAMS_FILE_PATH=C:\Program Files (x86) |
||||
|
||||
set GIT_BIN=%PROGRAMS_FILE_PATH%\Git\bin |
||||
set VS_BIN=%PROGRAMS_FILE_PATH%\Microsoft Visual Studio 9.0\VC\bin |
||||
set WIN_SDK_BIN=%PROGRAMS_FILE_PATH%\Microsoft SDKs\Windows\v6.0A\Bin |
||||
set INNO_EXE=%PROGRAMS_FILE_PATH%\Inno Setup 5\iscc.exe |
||||
set BUILD_DIR=build\win32\release |
||||
set LRELEASE=%QT_DIR%\bin\lrelease |
||||
|
||||
set PATH=%QT_BIN%;%PATH%;%WIN_SDK_BIN%;%GIT_BIN% |
||||
|
||||
call "%VS_BIN%\vcvars32.bat" |
||||
|
||||
echo %PATH% |
||||
|
||||
REM this checks if the custom qt directory path |
||||
REM is correct. This is important because installer |
||||
REM pick up dll from this directory |
||||
IF NOT EXIST "..\Qt-sankore3.1\lib\QtCore4.dll" GOTO EXIT_WITH_ERROR |
||||
|
||||
REM rmdir /S /Q %BUILD_DIR% |
||||
|
||||
set EDITION=MNEMIS_EDITION |
||||
|
||||
"%QT_BIN%\qmake.exe" "DEFINES+=%EDITION%" |
||||
|
||||
%LRELEASE% Sankore_3.1.pro |
||||
|
||||
set /p VERSION= < build\win32\release\version |
||||
git rev-list --tags --max-count=1 > tmp |
||||
set /p LAST_TAG= < tmp |
||||
erase tmp |
||||
git describe %LAST_TAG% > tmp |
||||
set /p LAST_TAG_VERSION=< tmp |
||||
erase tmp |
||||
|
||||
echo %VERSION% |
||||
echo %LAST_TAG_VERSION% |
||||
|
||||
REM if not v%VERSION%==%LAST_TAG_VERSION% GOTO EXIT_WITH_ERROR |
||||
|
||||
nmake release-install |
||||
|
||||
del ".\build\win32\release\product\Sankore.pdb" |
||||
|
||||
set INSTALLER_NAME=Open-Sankore |
||||
|
||||
set INSTALLER_PATH=.\install\win32\%INSTALLER_NAME%.exe |
||||
|
||||
call "%INNO_EXE%" "Sankore 3.1.iss" /F"%INSTALLER_NAME%" |
||||
|
||||
:EXIT_WITH_ERROR |
||||
echo ERROR |
@ -1,169 +1,176 @@ |
||||
|
||||
body{ |
||||
margin-top:10px; |
||||
margin-left:10px; |
||||
font-family:Arial, Sans-serif; |
||||
font-size:15px; |
||||
color:#444; |
||||
margin-top:10px; |
||||
margin-left:10px; |
||||
font-family:Arial, Sans-serif; |
||||
font-size:15px; |
||||
color:#444; |
||||
} |
||||
|
||||
.icon-container{ |
||||
width:40px; |
||||
height:40px; |
||||
overflow:hidden; |
||||
width:40px; |
||||
height:40px; |
||||
overflow:hidden; |
||||
} |
||||
|
||||
#shadow{ |
||||
position:absolute; |
||||
z-index:0; |
||||
width:352px; |
||||
height:58px; |
||||
padding-left:8px; |
||||
margin-top:3px; |
||||
margin-left:3px; |
||||
background-color:rgb(220,220,220); |
||||
position:absolute; |
||||
z-index:0; |
||||
width:352px; |
||||
height:58px; |
||||
padding-left:8px; |
||||
margin-top:3px; |
||||
margin-left:3px; |
||||
background-color:rgb(220,220,220); |
||||
} |
||||
|
||||
#inputfield{ |
||||
position:absolute; |
||||
z-index:1; |
||||
width:360px; |
||||
height:58px; |
||||
background-color:rgb(230,230,233); |
||||
border:1px solid rgb(220, 220, 220); |
||||
position:absolute; |
||||
z-index:1; |
||||
width:360px; |
||||
height:58px; |
||||
background-color:rgb(230,230,233); |
||||
border:1px solid rgb(220, 220, 220); |
||||
} |
||||
|
||||
.button{ |
||||
float:left; |
||||
padding:4px 5px; |
||||
cursor:pointer; |
||||
background-color:rgb(45,65,250); |
||||
border:1px solid; |
||||
border-color:rgb(45,65,250) rgb(25,45,230) rgb(25,45,230) rgb(45,65,250); |
||||
text-transform:capitalize; |
||||
font-size:12px; |
||||
font-weight:bold; |
||||
color:white; |
||||
float:left; |
||||
padding:4px 5px; |
||||
cursor:pointer; |
||||
background-color:rgb(45,65,250); |
||||
border:1px solid; |
||||
border-color:rgb(45,65,250) rgb(25,45,230) rgb(25,45,230) rgb(45,65,250); |
||||
text-transform:capitalize; |
||||
font-size:12px; |
||||
font-weight:bold; |
||||
color:white; |
||||
} |
||||
|
||||
#search-button{ |
||||
margin-top:17px; |
||||
margin-left:17px; |
||||
margin-top:17px; |
||||
margin-left:17px; |
||||
} |
||||
|
||||
#search-button.over{ |
||||
border-color:rgb(25,45,230) rgb(45,65,250) rgb(45,65,250) rgb(25,45,230); |
||||
border-color:rgb(25,45,230) rgb(45,65,250) rgb(45,65,250) rgb(25,45,230); |
||||
} |
||||
|
||||
#show-inputfield-button{ |
||||
margin-left:12px; |
||||
margin-left:12px; |
||||
} |
||||
|
||||
#container{ |
||||
float:left; |
||||
position:relative; |
||||
overflow:visible; |
||||
height:auto; |
||||
float:left; |
||||
position:relative; |
||||
overflow:visible; |
||||
height:auto; |
||||
} |
||||
|
||||
#container.welcome{ |
||||
width:405px; |
||||
margin-top:87px; |
||||
background-color:#FFF; |
||||
width:405px; |
||||
margin-top:87px; |
||||
background-color:#FFF; |
||||
} |
||||
|
||||
#container.load{ |
||||
margin-top:0px; |
||||
margin-top:0px; |
||||
} |
||||
|
||||
#container.show{ |
||||
margin-top:0px; |
||||
height:auto; |
||||
margin-top:0px; |
||||
height:auto; |
||||
} |
||||
|
||||
#container.change{ |
||||
margin-top:80px; |
||||
height:auto; |
||||
margin-top:80px; |
||||
height:auto; |
||||
} |
||||
|
||||
#container.error{ |
||||
width:400px; |
||||
height:auto; |
||||
margin-top:87px; |
||||
background-color:#FFF; |
||||
position:relative; |
||||
width:400px; |
||||
height:auto; |
||||
margin-top:87px; |
||||
background-color:#FFF; |
||||
position:relative; |
||||
} |
||||
|
||||
#arrow{ |
||||
text-align:center; |
||||
width:100%; |
||||
margin-top:-36px; |
||||
margin-bottom:-1px; |
||||
position:relative; |
||||
z-index:4; |
||||
text-align:center; |
||||
width:100%; |
||||
margin-top:-36px; |
||||
margin-bottom:-1px; |
||||
position:relative; |
||||
z-index:4; |
||||
} |
||||
|
||||
#embeded-content{ |
||||
border:1px solid rgb(230,230,230); |
||||
position:relative; |
||||
z-index:3; |
||||
float:left; |
||||
height:auto; |
||||
border:1px solid rgb(230,230,230); |
||||
position:relative; |
||||
z-index:3; |
||||
float:left; |
||||
height:auto; |
||||
} |
||||
|
||||
#show-container{ |
||||
overflow:auto; |
||||
height:auto; |
||||
overflow:auto; |
||||
height:auto; |
||||
} |
||||
|
||||
#show-area{ |
||||
display:none; |
||||
position:absolute; |
||||
top:150px; |
||||
left:400px; |
||||
z-index:999; |
||||
display:none; |
||||
position:absolute; |
||||
top:150px; |
||||
left:400px; |
||||
z-index:999; |
||||
} |
||||
|
||||
#show-area .icon-container{ |
||||
margin:0 auto; |
||||
margin:0 auto; |
||||
} |
||||
|
||||
#textbox{ |
||||
width:245px; |
||||
float:left; |
||||
padding:2px; |
||||
margin-top:17px; |
||||
margin-left:17px; |
||||
outline:none; |
||||
border:1px solid #666; |
||||
font-family:Arial, Sans-serif; |
||||
font-size:15px; |
||||
color:#444; |
||||
width:245px; |
||||
float:left; |
||||
padding:2px; |
||||
margin-top:17px; |
||||
margin-left:17px; |
||||
outline:none; |
||||
font-family:Arial, Sans-serif; |
||||
font-size:15px; |
||||
color:#444; |
||||
} |
||||
|
||||
#container-shadow{ |
||||
width:100%; |
||||
height:30px; |
||||
width:100%; |
||||
height:30px; |
||||
} |
||||
|
||||
#container-shadow td{ |
||||
height:100%; |
||||
height:100%; |
||||
} |
||||
|
||||
#shadow-left{ |
||||
width:193px; |
||||
background-image:url(../imgs/left.png); |
||||
background-repeat:no-repeat; |
||||
width:193px; |
||||
background-image:url(../imgs/left.png); |
||||
background-repeat:no-repeat; |
||||
} |
||||
|
||||
#shadow-center{ |
||||
width:auto; |
||||
background-image:url(../imgs/center.png); |
||||
background-repeat:repeat; |
||||
width:auto; |
||||
background-image:url(../imgs/center.png); |
||||
background-repeat:repeat; |
||||
} |
||||
|
||||
#shadow-right{ |
||||
width:193px; |
||||
background-image:url(../imgs/right.png); |
||||
background-repeat:no-repeat; |
||||
width:193px; |
||||
background-image:url(../imgs/right.png); |
||||
background-repeat:no-repeat; |
||||
} |
||||
|
||||
.bordered1{ |
||||
border: 1px solid red; |
||||
} |
||||
|
||||
.bordered2{ |
||||
border:1px solid #666; |
||||
} |
@ -0,0 +1,16 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<widget xmlns="http://www.w3.org/ns/widgets" |
||||
xmlns:ub="http://uniboard.mnemis.com/widgets" |
||||
id="http://uniboard.mnemis.com/widgets/webbrowser" |
||||
version="1.1" |
||||
width="900" |
||||
height="500" |
||||
ub:resizable="true"> |
||||
|
||||
<name>Choisir</name> |
||||
<author href="http://www.getuniboard.com" |
||||
email="info@mnemis.com">Mnemis SA</author> |
||||
<description>Choisir widget</description> |
||||
|
||||
<content src="index.html"/> |
||||
</widget> |
@ -0,0 +1,148 @@ |
||||
body{ |
||||
width: 100%; |
||||
padding: 0; |
||||
height: auto; |
||||
background-color: white; |
||||
margin: 0; |
||||
} |
||||
|
||||
.disclaimer{ |
||||
width: 90%; |
||||
height: 50px; |
||||
position: absolute; |
||||
left: 0; |
||||
bottom: 0; |
||||
margin-left: 1px; |
||||
margin-right: 1px; |
||||
margin-bottom: 0px; |
||||
padding: 5px; |
||||
text-align: center; |
||||
background-color: #BBBBBB; |
||||
-webkit-border-top-left-radius: 15px; |
||||
-webkit-border-top-right-radius: 15px; |
||||
border-top-left-radius: 15px; |
||||
border-top-right-radius: 15px; |
||||
border: solid 4px #EEEEEE; |
||||
border-bottom: none; |
||||
z-index: 10; |
||||
} |
||||
|
||||
.search{ |
||||
width: 90%; |
||||
position: absolute; |
||||
top: 0; |
||||
left: 0; |
||||
margin-left: 1px; |
||||
margin-right: 1px; |
||||
margin-top: 0px; |
||||
padding: 5px; |
||||
background-color: #BBBBBB; |
||||
-webkit-border-bottom-left-radius: 15px; |
||||
-webkit-border-bottom-right-radius: 15px; |
||||
border-bottom-left-radius: 15px; |
||||
border-bottom-right-radius: 15px; |
||||
border: solid 4px #EEEEEE; |
||||
border-top: none; |
||||
z-index: 10; |
||||
} |
||||
|
||||
.togglePages{ |
||||
padding: 0; |
||||
position: absolute; |
||||
bottom: -14px; |
||||
left: 43%; |
||||
width: 15%; |
||||
height: 10px; |
||||
background-color: #666; |
||||
-webkit-border-bottom-left-radius: 5px; |
||||
-webkit-border-bottom-right-radius: 5px; |
||||
border-bottom-left-radius: 5px; |
||||
border-bottom-right-radius: 5px; |
||||
-webkit-box-shadow: #dadada -1px 0 4px; |
||||
box-shadow: #dadada -1px 0 4px; |
||||
cursor: pointer; |
||||
} |
||||
|
||||
.toggleIcon{ |
||||
width: 14px; |
||||
height: 10px; |
||||
background-image: url(../images/trgUp.png); |
||||
} |
||||
|
||||
.searchInput{ |
||||
margin: 10px 5px 10px 5px; |
||||
padding: 2px; |
||||
padding-left: 8px; |
||||
padding-right:8px; |
||||
float: left; |
||||
width: 60%; |
||||
border-radius: 15px; |
||||
border-style: none; |
||||
} |
||||
|
||||
.searchButton{ |
||||
width: 32px; |
||||
height: 32px; |
||||
margin: 5px 5px; |
||||
background-image: url(../images/search.png); |
||||
float: left; |
||||
cursor: pointer; |
||||
} |
||||
|
||||
.subSearch{ |
||||
margin: 0; |
||||
float: left; |
||||
} |
||||
|
||||
#subSearchInput{ |
||||
width: 100%; |
||||
float: left; |
||||
} |
||||
|
||||
.searchResult{ |
||||
width: 98%; |
||||
padding: 3px; |
||||
background-color:#123456; |
||||
} |
||||
|
||||
.videoContainer{ |
||||
float: left; |
||||
padding: 3px; |
||||
margin: 3px; |
||||
text-align: center; |
||||
overflow: hidden; |
||||
font-size: small; |
||||
font-family: Verdana,Arial,Helvetica,sans-serif; |
||||
border: 1px solid #666; |
||||
border-radius: 5px; |
||||
-webkit-box-shadow: #dadada -1px 0 4px; |
||||
-webkit-border-radius: 5px; |
||||
box-shadow: #666 -1px 0 4px; |
||||
} |
||||
|
||||
.resultFooter{ |
||||
float: left; |
||||
margin: 5px; |
||||
padding: 3px; |
||||
width: 100%; |
||||
font-family: Verdana,Arial,Helvetica,sans-serif; |
||||
font-weight: bold; |
||||
font-size: x-large; |
||||
} |
||||
|
||||
#branding{ |
||||
position: absolute; |
||||
top: 0; |
||||
left: 10px; |
||||
z-index: 2; |
||||
} |
||||
|
||||
span{ |
||||
font-family: Verdana,Arial,Helvetica,sans-serif; |
||||
color: #666; |
||||
} |
||||
|
||||
[draggable] { |
||||
-webkit-user-select: none; |
||||
user-select: none; |
||||
} |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 214 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 931 B |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 475 B |
After Width: | Height: | Size: 448 B |
After Width: | Height: | Size: 1.2 KiB |
@ -0,0 +1,279 @@ |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<title>Google Image Search</title> |
||||
<link rel="stylesheet" type="text/css" href="css/basic.css"/> |
||||
<script type="text/javascript" src="http://www.google.com/uds"></script> |
||||
<script type="text/javascript" src="scripts/jquery-1.6.2.min.js"></script> |
||||
<script type="text/javascript"> |
||||
// This code generates a "Raw Searcher" to handle search queries. The Raw Searcher requires |
||||
// you to handle and draw the search results manually. |
||||
google.load('search', '1'); |
||||
|
||||
var videoSearch; |
||||
var minHeight = 180; |
||||
var minWidht = 150; |
||||
var filtersDisplayed = false; //display or hide filters |
||||
|
||||
function addPaginationLinks() { |
||||
|
||||
// To paginate search results, use the cursor function. |
||||
var cursor = videoSearch.cursor; |
||||
var curPage = cursor.currentPageIndex; // check what page the app is on |
||||
var pagesDiv = $("<div id='resultFooter' class='resultFooter'>"); |
||||
for (var i = 0; i < cursor.pages.length; i++) { |
||||
var page = cursor.pages[i]; |
||||
if (curPage == i) { |
||||
|
||||
// If we are on the current page, then don't make a link. |
||||
var label = document.createTextNode(' ' + page.label + ' '); |
||||
pagesDiv.append($(label)); |
||||
} else { |
||||
|
||||
// Create links to other pages using gotoPage() on the searcher. |
||||
var link = document.createElement('a'); |
||||
link.href = 'javascript:videoSearch.gotoPage('+i+');'; |
||||
link.innerHTML = page.label; |
||||
link.style.marginRight = '2px'; |
||||
pagesDiv.append($(link)); |
||||
} |
||||
} |
||||
|
||||
pagesDiv.appendTo($('#searchResult')); |
||||
|
||||
$(".videoContainer").each(function(){ |
||||
this.addEventListener("dragstart", imageDragging, false); |
||||
}) |
||||
|
||||
$(".videoContainer").each(function(){ |
||||
this.addEventListener("dragenter", imageDragenter, false); |
||||
}) |
||||
|
||||
$(".videoContainer").each(function(){ |
||||
this.addEventListener("dragleave", imageDragleave, false); |
||||
}) |
||||
|
||||
$(".videoContainer").each(function(){ |
||||
this.addEventListener("dragover", imageDragover, false); |
||||
}) |
||||
} |
||||
|
||||
function searchComplete() { |
||||
|
||||
// Check that we got results |
||||
document.getElementById('searchResult').innerHTML = ''; |
||||
if (videoSearch.results && videoSearch.results.length > 0) { |
||||
|
||||
var contentDiv = $('#searchResult').empty(); |
||||
var results = videoSearch.results; |
||||
for (var i = 0; i < results.length; i++) { |
||||
|
||||
// Create HTML elements for search results |
||||
var result = results[i]; |
||||
/*var str = videoSearch.results[i].playUrl.replace("&autoplay=1","").replace("&autoplay=true",""); |
||||
alert(str) |
||||
a.src = str + "&autoPlay=false"; |
||||
a.type = "application/x-shockwave-flash";*/ |
||||
|
||||
// Append search results to the HTML nodes |
||||
//p.appendChild(a); |
||||
//document.body.appendChild(p); |
||||
|
||||
var videoContainer = $("<div class='videoContainer' draggable='true'>"); |
||||
var title = document.createElement('div'); |
||||
var vUrl = $("<input type='hidden'/>"); |
||||
var vContent = $("<input type='hidden'/>"); |
||||
var vHeight = $("<input type='hidden'/>"); |
||||
var vWidth = $("<input type='hidden'/>"); |
||||
var vTitle = $("<input type='hidden'/>"); |
||||
var vAuthor = $("<input type='hidden'/>"); |
||||
var vDuration = $("<input type='hidden'/>"); |
||||
var vPublished = $("<input type='hidden'/>"); |
||||
var vPublisher = $("<input type='hidden'/>"); |
||||
var vRating = $("<input type='hidden'/>"); |
||||
var vCount = $("<input type='hidden'/>"); |
||||
|
||||
// We use titleNoFormatting so that no HTML tags are left in the |
||||
// title |
||||
title.innerHTML = result.title; |
||||
var newImg = document.createElement('img'); |
||||
|
||||
// There is also a result.url property which has the escaped version |
||||
newImg.src = result.tbUrl; |
||||
//var str = videoSearch.results[i].playUrl.replace("&autoplay=1","").replace("&autoplay=true",""); |
||||
vUrl.attr("value", result.url); |
||||
vContent.attr("value", result.content); |
||||
vHeight.attr("value", result.tbHeight); |
||||
vWidth.attr("value", result.tbWidth); |
||||
vTitle.attr("value",result.titleNoFormatting); |
||||
vAuthor.attr("value", result.author); |
||||
vDuration.attr("value", result.duration); |
||||
vPublished.attr("value", result.published); |
||||
vPublisher.attr("value", result.publisher); |
||||
vRating.attr("value",result.rating); |
||||
vCount.attr("value",result.viewCount); |
||||
//var imgWidth = (result.tbWidth > minWidht)?result.tbWidth:minWidht; |
||||
//var imgHeight = (result.tbHeight > minHeight)?result.tbHeight:minHeight; |
||||
videoContainer.width(minWidht).height(minHeight); |
||||
videoContainer.append($(newImg)); |
||||
videoContainer.append($(title)); |
||||
videoContainer.append(vUrl); |
||||
videoContainer.append(vContent); |
||||
videoContainer.append(vHeight); |
||||
videoContainer.append(vWidth); |
||||
videoContainer.append(vTitle); |
||||
videoContainer.append(vAuthor); |
||||
videoContainer.append(vDuration); |
||||
videoContainer.append(vPublished); |
||||
videoContainer.append(vPublisher); |
||||
videoContainer.append(vRating); |
||||
videoContainer.append(vCount); |
||||
|
||||
// Put our title + image in the content |
||||
videoContainer.appendTo(contentDiv); |
||||
} |
||||
|
||||
addPaginationLinks(videoSearch); |
||||
} |
||||
} |
||||
|
||||
function onLoad() { |
||||
// Create a VideoSearch instance. |
||||
videoSearch = new google.search.VideoSearch(); |
||||
|
||||
// Set searchComplete as the callback function when a search is complete. The |
||||
// videoSearch object will have results in it. |
||||
videoSearch.setSearchCompleteCallback(this, searchComplete, null); |
||||
|
||||
videoSearch.setResultSetSize(8); |
||||
|
||||
// Include the required Google branding |
||||
google.search.Search.getBranding('branding'); |
||||
} |
||||
|
||||
// Set a callback to call your code when the page loads |
||||
google.setOnLoadCallback(onLoad); |
||||
|
||||
function imageDragging(e){ |
||||
e.dataTransfer.setData("text/plain",$(this).find("input:hidden").eq(0).val()); |
||||
//alert($(this).find("input:hidden").val()); |
||||
} |
||||
|
||||
function imageDragleave(e){ |
||||
return false; |
||||
} |
||||
|
||||
function imageDragover(e){ |
||||
return false; |
||||
} |
||||
|
||||
function imageDragenter(e){ |
||||
return false; |
||||
} |
||||
|
||||
$(document).ready(function(){ |
||||
|
||||
//variables |
||||
var mode = false; //search or view mode |
||||
var hide = false; //hide or no main panel |
||||
|
||||
//basic containers and elements |
||||
var disclaimer = $("<div id='disclaimer' class='disclaimer'>Disclaimer<div>").appendTo("body"); |
||||
var search = $("<div id='search' class='search'>").appendTo("body"); |
||||
|
||||
disclaimer.width($("body").width()-20); |
||||
search.width($("body").width()-20); |
||||
|
||||
var togglePages = $("<div id='togglePages' class='togglePages'>").appendTo(search); |
||||
var toggleIcon = $("<div id='toggleIcon' class='toggleIcon'>").appendTo(togglePages).css("margin-left",(togglePages.width()/2 - 7)); |
||||
|
||||
var subSearchInput = $("<div id='subSearchInput' class='subSearch'>").appendTo(search); |
||||
|
||||
var searchInput = $("<input id='searchInput' class='searchInput' type='text'/>").appendTo(subSearchInput); |
||||
var searchButton = $("<div id='searchButton' class='searchButton'>").appendTo(subSearchInput); |
||||
|
||||
togglePages.click(function(event){ |
||||
if(mode){ |
||||
hide = false; |
||||
$("#search, #disclaimer").slideDown('slow', function(){ |
||||
toggleIcon.css("background-image","url(images/trgUp.png)"); |
||||
togglePages.appendTo("#search").css("top","").css("bottom","-14px"); |
||||
}); |
||||
mode = false; |
||||
} else { |
||||
hide = true; |
||||
$("#search, #disclaimer").slideUp('slow', function(){ |
||||
toggleIcon.css("background-image","url(images/trgDown.png)"); |
||||
togglePages.appendTo("body").css("top","0"); |
||||
}); |
||||
mode = true; |
||||
} |
||||
}); |
||||
|
||||
searchButton.click(function(){ |
||||
if(!hide){ |
||||
videoSearch.execute(searchInput.val()); |
||||
togglePages.trigger("click"); |
||||
} |
||||
}); |
||||
|
||||
searchInput.keydown(function(event){ |
||||
if(!hide){ |
||||
if((event.keyCode == 0xA)||(event.keyCode == 0xD)){ |
||||
videoSearch.execute(searchInput.val()); |
||||
togglePages.trigger("click"); |
||||
} |
||||
|
||||
} |
||||
}); |
||||
|
||||
$(".videoContainer").live("click",function(){ |
||||
//alert(createMetaData($(this))); |
||||
sankore.sendFileMetadata(createMetaData($(this))); |
||||
}); |
||||
|
||||
$(window).resize(function(){ |
||||
disclaimer.width($("body").width()-20); |
||||
search.width($("body").width()-20); |
||||
toggleIcon.css("margin-left",(togglePages.width()/2 - 7)); |
||||
}) |
||||
|
||||
}); |
||||
|
||||
function createMetaData(parent){ |
||||
var meta = ""; |
||||
//alert($(this).find("input:hidden").eq(0).val()); |
||||
meta = "<metadata><data><key>Type</key><value>Video</value></data><data><key>Url</key><value>" + |
||||
parent.find("input:hidden").eq(0).val() + |
||||
"</value></data><data><key>Content</key><value>" + |
||||
parent.find("input:hidden").eq(1).val() + |
||||
"</value></data><data><key>tbHeight</key><value>" + |
||||
parent.find("input:hidden").eq(2).val() + |
||||
"</value></data><data><key>tbWidth</key><value>" + |
||||
parent.find("input:hidden").eq(3).val() + |
||||
"</value></data><data><key>Title</key><value>" + |
||||
parent.find("input:hidden").eq(4).val() + |
||||
"</value></data><data><key>Author</key><value>" + |
||||
parent.find("input:hidden").eq(5).val() + |
||||
"</value></data><data><key>Duration</key><value>" + |
||||
parent.find("input:hidden").eq(6).val() + |
||||
"</value></data><data><key>Published</key><value>" + |
||||
parent.find("input:hidden").eq(7).val() + |
||||
"</value></data><data><key>Publisher</key><value>" + |
||||
parent.find("input:hidden").eq(8).val() + |
||||
"</value></data><data><key>Rating</key><value>" + |
||||
parent.find("input:hidden").eq(9).val() + |
||||
"</value></data><data><key>View count</key><value>" + |
||||
parent.find("input:hidden").eq(10).val() + |
||||
"</value></data></metadata>"; |
||||
return meta; |
||||
} |
||||
|
||||
</script> |
||||
|
||||
</head> |
||||
<body style="font-family: Arial;border: 0 none;"> |
||||
<div id="branding" style="float: left;"></div><br /> |
||||
<div id="searchResult"></div> |
||||
</body> |
||||
</html> |
@ -1,91 +0,0 @@ |
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify |
||||
* it under the terms of the GNU General Public License as published by |
||||
* the Free Software Foundation, either version 3 of the License, or |
||||
* (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU General Public License |
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/ |
||||
|
||||
#include <QRegExp> |
||||
|
||||
#include "UBOEmbedParser.h" |
||||
|
||||
/**********************************************************************************
|
||||
---------------------------------------------------------------- |
||||
Here is an example of an embed content in an XML representation |
||||
---------------------------------------------------------------- |
||||
<oembed> |
||||
<provider_url>http://www.youtube.com/</provider_url>
|
||||
<title>EPISODE 36 Traditional Mediums</title> |
||||
<html> |
||||
<iframe width="480" height="270" src="http://www.youtube.com/embed/C3lApsNmdwM?fs=1&feature=oembed" frameborder="0" allowfullscreen></iframe> |
||||
</html> |
||||
<author_name>FZDSCHOOL</author_name> |
||||
<height>270</height> |
||||
<thumbnail_width>480</thumbnail_width> |
||||
<width>480</width> |
||||
<version>1.0</version> |
||||
<author_url>http://www.youtube.com/user/FZDSCHOOL</author_url>
|
||||
<provider_name>YouTube</provider_name> |
||||
<thumbnail_url>http://i4.ytimg.com/vi/C3lApsNmdwM/hqdefault.jpg</thumbnail_url>
|
||||
<type>video</type> |
||||
<thumbnail_height>360</thumbnail_height> |
||||
</oembed> |
||||
***********************************************************************************/ |
||||
typedef struct{ |
||||
QString providerUrl; |
||||
QString title; |
||||
QString author; |
||||
int height; |
||||
int thumbWidth; |
||||
float version; |
||||
QString authorUrl; |
||||
QString providerName; |
||||
QString thumbUrl; |
||||
QString type; |
||||
QString thumbHeight; |
||||
QString sourceUrl; |
||||
}sOEmbedContent; |
||||
|
||||
UBOEmbedParser::UBOEmbedParser(QObject *parent, const char* name) |
||||
{ |
||||
setObjectName(name); |
||||
mParsedTitles.clear(); |
||||
} |
||||
|
||||
UBOEmbedParser::~UBOEmbedParser() |
||||
{ |
||||
|
||||
} |
||||
|
||||
void UBOEmbedParser::parse(const QString& html, QList<QUrl> *pList) |
||||
{ |
||||
// get all the oembed links and parse their informations
|
||||
QString query = ""; |
||||
|
||||
} |
||||
|
||||
/**
|
||||
/brief Extract the oembed infos from the JSON |
||||
@param jsonUrl as the url of the JSON file |
||||
*/ |
||||
void UBOEmbedParser::getJSONInfos(const QString &jsonUrl) |
||||
{ |
||||
|
||||
} |
||||
|
||||
/**
|
||||
/brief Extract the oembed infos from the XML |
||||
@param xmlUrl as the url of the XML file |
||||
*/ |
||||
void UBOEmbedParser::getXMLInfos(const QString &xmlUrl) |
||||
{ |
||||
|
||||
} |