Permalink
Browse files

Updated to allow using as git submodule or with composer

  • Loading branch information...
1 parent d0195c9 commit 741495035d78df6f599f3df9cfdab81661f22b3e @Asgaroth committed Oct 29, 2012
Showing with 10 additions and 379 deletions.
  1. +1 −7 .gitignore
  2. 0 {protected/extensions/xupload → }/CHANGELOG
  3. +5 −1 README.md
  4. 0 {protected/extensions/xupload → }/XUpload.php
  5. 0 {protected/extensions/xupload → }/actions/XUploadAction.php
  6. 0 {protected/extensions/xupload → }/assets/css/jquery.fileupload-ui.css
  7. BIN {protected/extensions/xupload → }/assets/img/loading.gif
  8. BIN {protected/extensions/xupload → }/assets/img/progressbar.gif
  9. 0 {protected/extensions/xupload → }/assets/js/cors/jquery.postmessage-transport.js
  10. 0 {protected/extensions/xupload → }/assets/js/cors/jquery.xdr-transport.js
  11. 0 {protected/extensions/xupload → }/assets/js/jquery.fileupload-fp.js
  12. 0 {protected/extensions/xupload → }/assets/js/jquery.fileupload-ip.js
  13. 0 {protected/extensions/xupload → }/assets/js/jquery.fileupload-ui.js
  14. 0 {protected/extensions/xupload → }/assets/js/jquery.fileupload.js
  15. 0 {protected/extensions/xupload → }/assets/js/jquery.iframe-transport.js
  16. 0 {protected/extensions/xupload → }/assets/js/locale.js
  17. 0 {protected/extensions/xupload → }/assets/js/vendor/jquery.ui.widget.js
  18. +0 −20 bootstrap.sh
  19. +4 −0 composer.json
  20. +0 −15 css/style.css
  21. +0 −13 index.php
  22. 0 {protected/extensions/xupload → }/models/XUploadForm.php
  23. +0 −1 protected/.htaccess
  24. +0 −23 protected/components/Controller.php
  25. +0 −93 protected/config/main.php
  26. +0 −32 protected/controllers/SiteController.php
  27. +0 −104 protected/views/layouts/main.php
  28. +0 −12 protected/views/site/error.php
  29. +0 −31 protected/views/site/index.php
  30. +0 −4 protected/yiic
  31. +0 −16 protected/yiic.bat
  32. +0 −7 protected/yiic.php
  33. 0 {protected/extensions/xupload → }/views/download.php
  34. 0 {protected/extensions/xupload → }/views/form.php
  35. 0 {protected/extensions/xupload → }/views/upload.php
View
@@ -23,10 +23,4 @@ local.properties
.cproject
# PDT-specific
-.buildpath
-
-#Yii specific
-assets/**
-assets/**/*
-protected/runtime/**
-protected/runtime/**/*
+.buildpath
File renamed without changes.
View
@@ -1,4 +1,8 @@
# XUpload extension for Yii Framework
## Yii extension page
-[Extension page](http://www.yiiframework.com/extension/xupload/)
+[Extension page](http://www.yiiframework.com/extension/xupload/)
+
+
+* [XUpload Workflow example](http://www.yiiframework.com/wiki/348/xupload-workflow/)
+* [Additional form data with XUpload](http://www.yiiframework.com/wiki/395/additional-form-data-with-xupload/)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -1,20 +0,0 @@
-#!/bin/bash
-echo "The script you are running has basename `basename $0`, dirname `dirname $0`"
-echo "The present working directory is `pwd`"
-
-echo "Deleting runtime contents..."
-rm -Rf "`pwd`/protected/runtime"/*
-
-echo "Deleting assets..."
-rm -Rf "`pwd`/assets"/*
-
-echo "Setting folder ownwer and group..."
-chown alex:www-data -R "`pwd`"
-
-
-echo "Setting folder rights..."
-chmod 775 -R "`pwd`"
-chmod 777 -R "`pwd`/css/"
-chmod 777 -R "`pwd`/images/"
-chmod 777 -R "`pwd`/assets/"
-
View
@@ -0,0 +1,4 @@
+{
+ "name": "Asgaroth/xupload",
+ "description": "jQuery file upload extension for Yii, allows your users to easily upload files to the server"
+}
View
@@ -1,15 +0,0 @@
-@charset 'UTF-8';
-/*
- * jQuery File Upload Plugin CSS Example 1.0
- * https://github.com/blueimp/jQuery-File-Upload
- *
- * Copyright 2012, Sebastian Tschan
- * https://blueimp.net
- *
- * Licensed under the MIT license:
- * http://www.opensource.org/licenses/MIT
- */
-
-body{
- padding-top: 60px;
-}
View
@@ -1,13 +0,0 @@
-<?php
-
-// change the following paths if necessary
-$yii=dirname(__FILE__).'/../framework/yii/1.1.10/framework/yii.php';
-$config=dirname(__FILE__).'/protected/config/main.php';
-
-// remove the following lines when in production mode
-defined('YII_DEBUG') or define('YII_DEBUG',true);
-// specify how many levels of call stack should be shown in each log message
-defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
-
-require_once($yii);
-Yii::createWebApplication($config)->run();
File renamed without changes.
View
@@ -1 +0,0 @@
-deny from all
@@ -1,23 +0,0 @@
-<?php
-/**
- * Controller is the customized base controller class.
- * All controller classes for this application should extend from this base class.
- */
-class Controller extends CController
-{
- /**
- * @var string the default layout for the controller view. Defaults to '//layouts/column1',
- * meaning using a single column layout. See 'protected/views/layouts/column1.php'.
- */
- public $layout='//layouts/main';
- /**
- * @var array context menu items. This property will be assigned to {@link CMenu::items}.
- */
- public $menu=array();
- /**
- * @var array the breadcrumbs of the current page. The value of this property will
- * be assigned to {@link CBreadcrumbs::links}. Please refer to {@link CBreadcrumbs::links}
- * for more details on how to specify this property.
- */
- public $breadcrumbs=array();
-}
View
@@ -1,93 +0,0 @@
-<?php
-
-// uncomment the following to define a path alias
-// Yii::setPathOfAlias('local','path/to/local-folder');
-
-// This is the main Web application configuration. Any writable
-// CWebApplication properties can be configured here.
-return array(
- 'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
- 'name'=>'My Web Application',
-
- // preloading 'log' component
- 'preload'=>array('log'),
-
- // autoloading model and component classes
- 'import'=>array(
- 'application.models.*',
- 'application.components.*',
- ),
- 'aliases' => array(
- 'xupload' => 'ext.xupload'
- ),
-
- 'modules'=>array(
- // uncomment the following to enable the Gii tool
- /*
- 'gii'=>array(
- 'class'=>'system.gii.GiiModule',
- 'password'=>'Enter Your Password Here',
- // If removed, Gii defaults to localhost only. Edit carefully to taste.
- 'ipFilters'=>array('127.0.0.1','::1'),
- ),
- */
- ),
-
- // application components
- 'components'=>array(
- 'user'=>array(
- // enable cookie-based authentication
- 'allowAutoLogin'=>true,
- ),
- // uncomment the following to enable URLs in path-format
- /*
- 'urlManager'=>array(
- 'urlFormat'=>'path',
- 'rules'=>array(
- '<controller:\w+>/<id:\d+>'=>'<controller>/view',
- '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
- '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
- ),
- ),
- */
- 'db'=>array(
- 'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
- ),
- // uncomment the following to use a MySQL database
- /*
- 'db'=>array(
- 'connectionString' => 'mysql:host=localhost;dbname=testdrive',
- 'emulatePrepare' => true,
- 'username' => 'root',
- 'password' => '',
- 'charset' => 'utf8',
- ),
- */
- 'errorHandler'=>array(
- // use 'site/error' action to display errors
- 'errorAction'=>'site/error',
- ),
- 'log'=>array(
- 'class'=>'CLogRouter',
- 'routes'=>array(
- array(
- 'class'=>'CFileLogRoute',
- 'levels'=>'error, warning',
- ),
- // uncomment the following to show log messages on web pages
- /*
- array(
- 'class'=>'CWebLogRoute',
- ),
- */
- ),
- ),
- ),
-
- // application-level parameters that can be accessed
- // using Yii::app()->params['paramName']
- 'params'=>array(
- // this is used in contact page
- 'adminEmail'=>'webmaster@example.com',
- ),
-);
@@ -1,32 +0,0 @@
-<?php
-Yii::import("xupload.models.XUploadForm");
-class SiteController extends Controller {
-
- public function actions() {
- return array('upload' => array('class' => 'xupload.actions.XUploadAction', 'path' => Yii::app() -> getBasePath() . "/../images/uploads", "publicPath" => Yii::app()->getBaseUrl()."/images/uploads" ), );
- }
-
- /**
- * This is the default 'index' action that is invoked
- * when an action is not explicitly requested by users.
- */
- public function actionIndex() {
- // renders the view file 'protected/views/site/index.php'
- // using the default layout 'protected/views/layouts/main.php'
- $model = new XUploadForm;
- $this -> render('index', array('model' => $model, ));
- }
-
- /**
- * This is the action to handle external exceptions.
- */
- public function actionError() {
- if ($error = Yii::app() -> errorHandler -> error) {
- if (Yii::app() -> request -> isAjaxRequest)
- echo $error['message'];
- else
- $this -> render('error', $error);
- }
- }
-
-}
@@ -1,104 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-/*
- * jQuery File Upload Plugin Demo 6.5.1
- * https://github.com/blueimp/jQuery-File-Upload
- *
- * Copyright 2010, Sebastian Tschan
- * https://blueimp.net
- *
- * Licensed under the MIT license:
- * http://www.opensource.org/licenses/MIT
- */
--->
-<html lang="en">
-<head>
-<meta charset="utf-8">
-<title>jQuery File Upload Demo</title>
-<meta name="description" content="File Upload widget with multiple file selection, drag&amp;drop support, progress bar and preview images for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.">
-<meta name="viewport" content="width=device-width">
-<!-- Bootstrap CSS Toolkit styles -->
-<link rel="stylesheet" href="http://blueimp.github.com/cdn/css/bootstrap.min.css">
-<!-- Generic page styles -->
-<link rel="stylesheet" href="<?php echo Yii::app()->baseUrl; ?>/css/style.css">
-<!-- Bootstrap styles for responsive website layout, supporting different screen sizes -->
-<link rel="stylesheet" href="http://blueimp.github.com/cdn/css/bootstrap-responsive.min.css">
-<!-- Bootstrap CSS fixes for IE6 -->
-<!--[if lt IE 7]><link rel="stylesheet" href="http://blueimp.github.com/cdn/css/bootstrap-ie6.min.css"><![endif]-->
-<!-- Bootstrap Image Gallery styles -->
-<link rel="stylesheet" href="http://blueimp.github.com/Bootstrap-Image-Gallery/css/bootstrap-image-gallery.min.css">
-<!-- Shim to make HTML5 elements usable in older Internet Explorer versions -->
-<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
-</head>
-<body>
-<div class="navbar navbar-fixed-top">
- <div class="navbar-inner">
- <div class="container">
- <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </a>
- <a class="brand" href="https://github.com/blueimp/jQuery-File-Upload">jQuery File Upload</a>
- <div class="nav-collapse">
- <ul class="nav">
- <li class="active"><a href="<?php echo Yii::app()->createUrl("site/index"); ?>">Demo</a></li>
- <li><a href="http://www.yiiframework.com/extension/xupload/">Downloads</a></li>
- <li><a href="https://github.com/Asgaroth/xupload">Source Code</a></li>
- <li><a href="https://github.com/blueimp/jQuery-File-Upload/wiki">Documentation</a></li>
- <li><a href="https://github.com/Asgaroth/xupload/issues">Issues</a></li>
- </ul>
- <div class="pull-right">
- <ul class="nav">
- <li><a href="http://twitter.com/#!/asgarothbelem">@AsgarothBelem</a></li>
- </ul>
- </div>
- </div>
- </div>
- </div>
-</div>
-<div class="container">
- <?php echo $content; ?>
-</div>
-<!-- modal-gallery is the modal dialog used for the image gallery -->
-<div id="modal-gallery" class="modal modal-gallery hide fade">
- <div class="modal-header">
- <a class="close" data-dismiss="modal">&times;</a>
- <h3 class="modal-title"></h3>
- </div>
- <div class="modal-body"><div class="modal-image"></div></div>
- <div class="modal-footer">
- <a class="btn modal-download" target="_blank">
- <i class="icon-download"></i>
- <span>Download</span>
- </a>
- <a class="btn btn-success modal-play modal-slideshow" data-slideshow="5000">
- <i class="icon-play icon-white"></i>
- <span>Slideshow</span>
- </a>
- <a class="btn btn-info modal-prev">
- <i class="icon-arrow-left icon-white"></i>
- <span>Previous</span>
- </a>
- <a class="btn btn-primary modal-next">
- <span>Next</span>
- <i class="icon-arrow-right icon-white"></i>
- </a>
- </div>
-</div>
-
-<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
-<!-- The Templates plugin is included to render the upload/download listings -->
-<script src="http://blueimp.github.com/JavaScript-Templates/tmpl.min.js"></script>
-<!-- The Load Image plugin is included for the preview images and image resizing functionality -->
-<script src="http://blueimp.github.com/JavaScript-Load-Image/load-image.min.js"></script>
-<!-- The Canvas to Blob plugin is included for image resizing functionality -->
-<script src="http://blueimp.github.com/JavaScript-Canvas-to-Blob/canvas-to-blob.min.js"></script>
-<!-- Bootstrap JS and Bootstrap Image Gallery are not required, but included for the demo -->
-<script src="http://blueimp.github.com/cdn/js/bootstrap.min.js"></script>
-<script src="http://blueimp.github.com/Bootstrap-Image-Gallery/js/bootstrap-image-gallery.min.js"></script>
-<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
-<!-- The XDomainRequest Transport is included for cross-domain file deletion for IE8+ -->
-<!--[if gte IE 8]><script src="<?php echo Yii::app()->baseUrl; ?>/js/cors/jquery.xdr-transport.js"></script><![endif]-->
-</body>
-</html>
@@ -1,12 +0,0 @@
-<?php
-$this->pageTitle=Yii::app()->name . ' - Error';
-$this->breadcrumbs=array(
- 'Error',
-);
-?>
-
-<h2>Error <?php echo $code; ?></h2>
-
-<div class="error">
-<?php echo CHtml::encode($message); ?>
-</div>
@@ -1,31 +0,0 @@
-<div class="page-header">
- <h1>jQuery File Upload Demo</h1>
- </div>
- <blockquote>
- <p>File Upload widget with multiple file selection, drag&amp;drop support, progress bars and preview images for jQuery.<br>
- Supports cross-domain, chunked and resumable file uploads and client-side image resizing.<br>
- Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.</p>
- </blockquote>
- <br>
- <?php
- $this->widget('xupload.XUpload', array(
- 'url' => Yii::app()->createUrl("site/upload", array("parent_id" => 1)),
- 'model' => $model,
- 'attribute' => 'file',
- 'multiple' => true,
- ));
- ?>
-
-
- <br>
- <div class="well">
- <h3>Demo Notes</h3>
- <ul>
- <li>The maximum file size for uploads in this demo is <strong>5 MB</strong> (default file size is unlimited).</li>
- <li>Only image files (<strong>JPG, GIF, PNG</strong>) are allowed in this demo (by default there is no file type restriction).</li>
- <li>Uploaded files will be deleted automatically after <strong>5 minutes</strong> (demo setting).</li>
- <li>You can <strong>drag &amp; drop</strong> files from your desktop on this webpage with Google Chrome, Mozilla Firefox and Apple Safari.</li>
- <li>Please refer to the <a href="https://github.com/blueimp/jQuery-File-Upload">project website</a> and <a href="https://github.com/blueimp/jQuery-File-Upload/wiki">documentation</a> for more information.</li>
- <li>Built with Twitter's <a href="http://twitter.github.com/bootstrap/">Bootstrap</a> toolkit and Icons from <a href="http://glyphicons.com/">Glyphicons</a>.</li>
- </ul>
- </div>
View
@@ -1,4 +0,0 @@
-#!/usr/bin/env php
-<?php
-
-require_once(dirname(__FILE__).'/yiic.php');
Oops, something went wrong.

0 comments on commit 7414950

Please sign in to comment.