/**
 * Created with JetBrains RubyMine.
 * User: teamco
 * Date: 5/9/13
 * Time: 11:48 AM
 */

define([
    'modules/Element'
], function definePdfElement(BaseElement) {

    /**
     * Define Pdf Element
     * @param view
     * @param opts
     * @returns {PdfElement}
     * @constructor
     * @class PdfElement
     * @extends BaseElement
     */
    var PdfElement = function PdfElement(view, opts) {

        this._config(view, opts, $('<div />')).build({
            $container: opts.$container,
            destroy: true
        });

        this.addCSS('pdf', {resource: '/widgets'});

        return this;
    };

    return PdfElement.extend('PdfElement', {

        /**
         * Render Embedded content
         * @member PdfElement
         * @param {string} url
         */
        renderEmbeddedContent: function renderEmbeddedContent(url) {

            if (typeof (url) !== 'string' || (url && !(url + '').match(/\.pdf/))) {
                return false;
            }

            var $iframe = $('<iframe />').attr({
                src: 'http://docs.google.com/gview?url=' + url + '&embedded=true',
                frameborder: 0
            });

            this.$.append($iframe);
        }

    }, BaseElement.prototype);

});
@@ -939,16 +939,91 @@
 f/))) %7B%0A
+                this.view.scope.logger.warn('File does not match to PDF');%0A
         

fix pdf