Commit 18f00e6b authored by Claudio Valerio's avatar Claudio Valerio

removed export to planete

parent 71d182ce
......@@ -75,7 +75,6 @@ FORMS += resources/forms/mainWindow.ui \
resources/forms/blackoutWidget.ui \
resources/forms/trapFlash.ui \
resources/forms/youTubePublishingDialog.ui \
resources/forms/webPublishing.ui \
resources/forms/capturePublishing.ui \
resources/forms/intranetPodcastPublishingDialog.ui
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>documentPublishingDialog</class>
<widget class="QDialog" name="documentPublishingDialog">
<property name="windowModality">
<enum>Qt::WindowModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>607</width>
<height>405</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="titleLabel">
<property name="text">
<string>Title</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="title">
<property name="maxLength">
<number>60</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>E-mail</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="email"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Author</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="author"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="decriptionLabel">
<property name="text">
<string>Description</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QPlainTextEdit" name="description">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>168</height>
</size>
</property>
</widget>
</item>
<item row="4" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="attachPDF">
<property name="text">
<string>Attach Downloadable PDF Version</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QCheckBox" name="attachUBZ">
<property name="text">
<string>Attach Downloadable Uniboard File (UBZ)</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLabel" name="videoWarning">
<property name="text">
<string>Warning: This documents contains video, which will not be displayed properly on the Web</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QDialogButtonBox" name="dialogButtons">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
/*
* Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)
*
* This file is part of Open-Sankoré.
*
* Open-Sankoré 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, version 3 of the License,
* with a specific linking exception for the OpenSSL project's
* "OpenSSL" library (or with modified versions of it that use the
* same license as the "OpenSSL" library).
*
* Open-Sankoré 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 Open-Sankoré. If not, see <http://www.gnu.org/licenses/>.
*/
#include "UBWebPublisher.h"
#include "document/UBDocumentProxy.h"
#include "adaptors/publishing/UBDocumentPublisher.h"
#include "core/memcheck.h"
UBWebPublisher::UBWebPublisher(QObject *parent)
: UBExportAdaptor(parent)
{
// NOOP
}
UBWebPublisher::~UBWebPublisher()
{
// NOOP
}
QString UBWebPublisher::exportName()
{
return tr("Publish Document on Sankore Web");
}
void UBWebPublisher::persist(UBDocumentProxy* pDocumentProxy)
{
if (!pDocumentProxy)
return;
UBDocumentPublisher* publisher = new UBDocumentPublisher(pDocumentProxy, this); // the publisher will self delete when publication finishes
publisher->publish();
}
/*
* Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)
*
* This file is part of Open-Sankoré.
*
* Open-Sankoré 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, version 3 of the License,
* with a specific linking exception for the OpenSSL project's
* "OpenSSL" library (or with modified versions of it that use the
* same license as the "OpenSSL" library).
*
* Open-Sankoré 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 Open-Sankoré. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UBWEBPUBLISHER_H_
#define UBWEBPUBLISHER_H_
#include <QtGui>
#include "UBExportAdaptor.h"
#include "frameworks/UBFileSystemUtils.h"
#include "ui_webPublishing.h"
class UBDocumentProxy;
class UBServerXMLHttpRequest;
class UBWebPublisher : public UBExportAdaptor
{
Q_OBJECT;
public:
UBWebPublisher(QObject *parent = 0);
virtual ~UBWebPublisher();
virtual QString exportName();
virtual void persist(UBDocumentProxy* pDocument);
};
#endif /* UBWEBPUBLISHER_H_ */
......@@ -12,7 +12,6 @@ HEADERS += src/adaptors/UBExportAdaptor.h\
src/adaptors/UBImportImage.h \
src/adaptors/UBIniFileParser.h \
src/adaptors/UBExportWeb.h \
src/adaptors/UBWebPublisher.h \
src/adaptors/UBImportCFF.h \
src/adaptors/UBExportCFF.h \
src/adaptors/UBCFFSubsetAdaptor.h
......@@ -35,7 +34,6 @@ SOURCES += src/adaptors/UBExportAdaptor.cpp\
src/adaptors/UBImportImage.cpp \
src/adaptors/UBIniFileParser.cpp \
src/adaptors/UBExportWeb.cpp \
src/adaptors/UBWebPublisher.cpp \
src/adaptors/UBImportCFF.cpp \
src/adaptors/UBExportCFF.cpp \
src/adaptors/UBCFFSubsetAdaptor.cpp \
......
......@@ -27,9 +27,7 @@
#include <QtGui>
#include <QtNetwork>
#include "ui_webPublishing.h"
#define DOCPUBLICATION_URL "http://planete.sankore.org/xwiki/bin/view/CreateResources/UniboardUpload?xpage=plain&outputSyntax=plain"
//#define DOCPUBLICATION_URL "http://planete.sankore.org/xwiki/bin/view/CreateResources/UniboardUpload?xpage=plain&outputSyntax=plain"
typedef struct
{
......@@ -85,58 +83,4 @@ private:
QTextEdit* mpDescription;
QDialogButtonBox* mpButtons;
};
class UBDocumentPublisher : public QObject
{
Q_OBJECT;
public:
explicit UBDocumentPublisher(UBDocumentProxy* sourceDocument, QObject *parent = 0);
virtual ~UBDocumentPublisher();
void publish();
signals:
void loginDone();
protected:
virtual void updateGoogleMapApiKey();
virtual void rasterizeScenes();
virtual void upgradeDocumentForPublishing();
virtual void generateWidgetPropertyScript(UBGraphicsW3CWidgetItem *widgetItem, int pageNumber);
private slots:
void onFinished(QNetworkReply* reply);
private:
UBDocumentProxy *mSourceDocument;
//UBDocumentProxy *mPublishingDocument;
QString mPublishingPath;
int mPublishingSize;
void init();
void sendUbw(QString username, QString password);
QString getBase64Of(QString stringToEncode);
QHBoxLayout* mpLayout;
QNetworkAccessManager* mpNetworkMgr;
QNetworkCookieJar* mpCookieJar;
QString mUsername;
QString mPassword;
QString mCrlf;
bool bLoginCookieSet;
void buildUbwFile();
QString mTmpZipFile;
QList<QNetworkCookie> mCookies;
sDocumentInfos mDocInfos;
};
#endif // UBDOCUMENTPUBLISHER_H
......@@ -29,7 +29,6 @@
#include "adaptors/UBExportDocument.h"
#include "adaptors/UBExportWeb.h"
#include "adaptors/UBExportCFF.h"
#include "adaptors/UBWebPublisher.h"
#include "adaptors/UBImportDocument.h"
#include "adaptors/UBImportPDF.h"
#include "adaptors/UBImportImage.h"
......@@ -47,8 +46,6 @@
#include "UBSettings.h"
#include "UBPersistenceManager.h"
#include "../adaptors/UBExportWeb.h"
#include "core/memcheck.h"
UBDocumentManager* UBDocumentManager::sDocumentManager = 0;
......@@ -75,13 +72,9 @@ UBDocumentManager::UBDocumentManager(QObject *parent)
UBExportCFF* cffExporter = new UBExportCFF(this);
UBExportFullPDF* exportFullPdf = new UBExportFullPDF(this);
UBExportDocument* exportDocument = new UBExportDocument(this);
UBWebPublisher* webPublished = new UBWebPublisher(this);
mExportAdaptors.append(exportDocument);
mExportAdaptors.append(webPublished);
mExportAdaptors.append(exportFullPdf);
mExportAdaptors.append(cffExporter);
// UBExportWeb* exportWeb = new UBExportWeb(this);
// mExportAdaptors.append(exportWeb);
UBImportDocument* documentImport = new UBImportDocument(this);
mImportAdaptors.append(documentImport);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment